Skip to content

Commit 9063416

Browse files
authored
fix: update release workflows (#76)
<!-- Thank you for proposing a pull request! Please note that SOME TESTS WILL LIKELY FAIL due to how GitHub exposes secrets in Pull Requests from forks. Someone from the team will review your Pull Request and respond. Please describe your change and any implementation details below. -->
1 parent b01b7b7 commit 9063416

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
lines changed

.github/workflows/publish.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: 'Publish immutable action version'
2+
3+
on:
4+
workflow_dispatch:
5+
release:
6+
types:
7+
- 'published'
8+
9+
jobs:
10+
publish:
11+
runs-on: 'ubuntu-latest'
12+
permissions:
13+
contents: 'read'
14+
id-token: 'write'
15+
packages: 'write'
16+
17+
steps:
18+
- name: 'Checkout'
19+
uses: 'actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871' # ratchet:actions/checkout@v4
20+
21+
- name: 'Publish'
22+
id: 'publish'
23+
uses: 'actions/publish-immutable-action@4b1aa5c1cde5fedc80d52746c9546cb5560e5f53' # ratchet:actions/publish-immutable-action@v0.0.3
24+
with:
25+
github-token: '${{ secrets.GITHUB_TOKEN }}'

.github/workflows/release.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88

99
jobs:
1010
release:
11-
if: "startsWith(github.event.head_commit.message, 'Release: v')"
11+
if: |-
12+
${{ startsWith(github.event.head_commit.message, 'Release: v') }}
1213
name: 'Release'
13-
uses: 'google-github-actions/.github/.github/workflows/release.yml@v0'
14+
uses: 'google-github-actions/.github/.github/workflows/release.yml@v1' # ratchet:exclude
15+
# 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
16+
secrets:
17+
ACTIONS_BOT_TOKEN: '${{ secrets.ACTIONS_BOT_TOKEN }}'

0 commit comments

Comments
 (0)