Skip to content

Commit

Permalink
ci: publish pre or latest based on GitHub release (#219)
Browse files Browse the repository at this point in the history
  • Loading branch information
aelesbao authored Sep 7, 2023
1 parent 3f4b448 commit 17eace8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Publish package to npmjs

on:
push:
tags: ["*"]
release:
types: [published]

jobs:
publish:
Expand All @@ -15,6 +15,6 @@ jobs:
registry-url: "https://registry.npmjs.org"
- run: yarn install --immutable
- run: yarn config set -H npmAuthToken "${{ secrets.NPM_TOKEN }}"
- run: yarn publish --tag alpha --access public
- run: yarn publish --tag ${{ github.event.release.prerelease == true && 'pre' || 'latest' }} --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 17eace8

Please sign in to comment.