Skip to content

Commit

Permalink
Add action for updating latest
Browse files Browse the repository at this point in the history
  • Loading branch information
eoftedal committed Oct 30, 2024
1 parent e77f7ae commit 72799d3
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/setLatestToMain.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Publish Package to npmjs
on:
workflow_dispatch:

jobs:
update-latest-tag:
if: github.ref == 'refs/heads/master' # Only runs on master branch
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "18.x"
registry-url: "https://registry.npmjs.org"
- run: npm install -g npm
working-directory: node
- run: npm dist-tag add retire@$(cat node/package.json| jq -r ".version") latest
working-directory: node
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 72799d3

Please sign in to comment.