Skip to content

Commit

Permalink
tag npm packages according to branch
Browse files Browse the repository at this point in the history
  • Loading branch information
luludotdev committed Apr 4, 2024
1 parent 2553448 commit 72400ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

publish-dev:
needs: test
if: github.event_name == 'push' && github.ref == 'refs/heads/trunk'
if: github.event_name == 'push'
runs-on: ubuntu-latest

steps:
Expand All @@ -56,6 +56,6 @@ jobs:
- name: Edit version
run: npm --ignore-scripts --no-git-tag-version version ${{ steps.info.outputs.pkg_version }}-dev-${{ steps.info.outputs.hash }}
- name: Publish to NPM
run: npm publish --access=public --tag=dev
run: npm publish --access=public --tag=${{ github.ref == 'refs/heads/main' && 'dev' || github.ref_name }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 72400ab

Please sign in to comment.