Skip to content

Commit 6ad01a0

Browse files
jeffwidmanNishnha
andauthored
Add workflow to publish new version of immutable action on every release (#623)
Adds a workflow that publishes a new version of the immutable action package for this action on every release. Co-authored-by: Nish Sinha <nishnha@github.com>
1 parent 8ca800c commit 6ad01a0

File tree

4 files changed

+37
-2
lines changed

4 files changed

+37
-2
lines changed

.github/workflows/release-bump-version.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,4 @@ jobs:
8989
echo " > https://github.com/${{ github.repository }}/releases/tag/untagged-XXXXXX" >> $GITHUB_STEP_SUMMARY
9090
echo " # Use the generated URL to review/edit the release notes." >> $GITHUB_STEP_SUMMARY
9191
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
92-
echo "Once the release is tagged, another GitHub Action workflow automatically moves the floating \`v2\` tag to point at this release." >> $GITHUB_STEP_SUMMARY
92+
echo "Once the release is tagged, another GitHub Action workflow automatically publishes the new version of the immutable action package for this release." >> $GITHUB_STEP_SUMMARY

.github/workflows/release-move-tracking-tag.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# TODO: This GitHub Action was migrated to Immutable Actions, which resolves versions from packages
2+
# rather than from git tags. So theoretically floating this tracking tag isn't necessary.
3+
# However, Immutable Actions are still in beta, and currently (May 8, 2025) only hosted runners
4+
# are resolving immutable actions from packages. Self-hosted runners are still pulling from git tags.
5+
# So we still need to float this tracking tag. Once Immutable Actions is fully GA'd, then _all_ runners
6+
# should be resolving from the immutable actions packages, and then we should delete both
7+
# this workflow AND the `v1`/`v2` git tags.
8+
19
name: Release - Move Tracking Tag
210

311
on:
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: "Publish Immutable Action Version"
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
11+
permissions:
12+
contents: read
13+
id-token: write
14+
packages: write
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Publish
20+
id: publish
21+
uses: actions/publish-immutable-action@0.0.3
22+
with:
23+
github-token: ${{ secrets.GITHUB_TOKEN }}
24+
25+
- name: Set summary
26+
run: |
27+
echo ":rocket: Successfully published a new version of the immutable action package pointing at release: ${{ github.event.release.name }}" >> $GITHUB_STEP_SUMMARY

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ jobs:
205205
1. Run the action to generate a version bump PR.
206206
2. Merge the PR.
207207
3. Tag that merge commit as a new release using the format `v1.2.3`. The job summary contains a URL pre-populated with the correct version for the title and tag.
208-
4. Once the release is tagged, another GitHub Action workflow automatically moves the `v2` tracking tag to point to the new version.
208+
4. Once the release is tagged, another GitHub Action workflow automatically publishes the new version of the immutable action package for this release.
209209

210210
</p>
211211
</details>

0 commit comments

Comments
 (0)