From 72d990ff96f9aa3a2d8481db67d0c4e45ef6f989 Mon Sep 17 00:00:00 2001 From: Mike Verbanic Date: Wed, 23 Oct 2024 16:32:27 -0400 Subject: [PATCH] fix: release and publish --- .github/workflows/publish.yml | 25 ------------------------- .github/workflows/release.yml | 25 +++++++++++++++++++++---- package-lock.json | 8 ++++---- package.json | 2 +- 4 files changed, 26 insertions(+), 34 deletions(-) delete mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index 64566b6..0000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: 'Publish immutable action version' - -on: - workflow_dispatch: - release: - types: - - 'published' - -jobs: - publish: - runs-on: 'ubuntu-latest' - permissions: - contents: 'read' - id-token: 'write' - packages: 'write' - - steps: - - name: 'Checkout' - uses: 'actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871' # ratchet:actions/checkout@v4 - - - name: 'Publish' - id: 'publish' - uses: 'actions/publish-immutable-action@4b1aa5c1cde5fedc80d52746c9546cb5560e5f53' # ratchet:actions/publish-immutable-action@v0.0.3 - with: - github-token: '${{ secrets.GITHUB_TOKEN }}' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9af9621..894d36a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,7 +11,24 @@ jobs: if: |- startsWith(github.event.head_commit.message, 'Release: v') name: 'Release' - uses: 'google-github-actions/.github/.github/workflows/release.yml@v1' # ratchet:exclude - # secrets must be explicitly passed to reusable workflows https://docs.github.com/en/enterprise-cloud@latest/actions/using-workflows/reusing-workflows#using-inputs-and-secrets-in-a-reusable-workflow - secrets: - ACTIONS_BOT_TOKEN: '${{ secrets.ACTIONS_BOT_TOKEN }}' + uses: 'google-github-actions/.github/.github/workflows/release.yml@v0' # ratchet:exclude + + publish: + if: |- + startsWith(github.event.head_commit.message, 'Release: v') + runs-on: 'ubuntu-latest' + needs: 'release' + permissions: + contents: 'read' + id-token: 'write' + packages: 'write' + + steps: + - name: 'Checkout' + uses: 'actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871' # ratchet:actions/checkout@v4 + + - name: 'Publish' + id: 'publish' + uses: 'actions/publish-immutable-action@4b1aa5c1cde5fedc80d52746c9546cb5560e5f53' # ratchet:actions/publish-immutable-action@v0.0.3 + with: + github-token: '${{ secrets.GITHUB_TOKEN }}' diff --git a/package-lock.json b/package-lock.json index 73375e4..69c0e41 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { - "name": "deploy-cloud-functions", - "version": "3.0.6", + "name": "@google-github-actions/deploy-cloud-functions", + "version": "3.0.5", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "deploy-cloud-functions", - "version": "3.0.6", + "name": "@google-github-actions/deploy-cloud-functions", + "version": "3.0.5", "license": "Apache-2.0", "dependencies": { "@actions/core": "^1.10.1", diff --git a/package.json b/package.json index 4c43500..9e90ee5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@google-github-actions/deploy-cloud-functions", - "version": "3.0.6", + "version": "3.0.5", "description": "Deploy a Cloud Function", "main": "dist/index.js", "scripts": {