Skip to content

Commit 449847e

Browse files
committed
Keep GitHub latest aligned with npm
1 parent e76e7dd commit 449847e

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

.github/workflows/promote.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414
- "promote-latest-v*"
1515

1616
permissions:
17-
contents: read
17+
contents: write
1818

1919
jobs:
2020
promote:
@@ -37,3 +37,10 @@ jobs:
3737
npm dist-tag add "codebase-cli@$VERSION" latest
3838
env:
3939
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
40+
41+
- name: Mark the matching GitHub release as latest
42+
run: |
43+
VERSION="${GITHUB_REF_NAME#promote-latest-v}"
44+
gh release edit "v$VERSION" --prerelease=false --latest
45+
env:
46+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)