Skip to content

Commit

Permalink
update package publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
JackNoordhuis committed Sep 12, 2023
1 parent cfc28b6 commit 0994d5a
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions .github/workflows/package-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@ jobs:
matrix:
node-version: [18]

env:
is_latest: ${{ github.ref == 'refs/heads/dist' }}

outputs:
is_latest: ${{ env.is_latest }}

steps:
- uses: actions/checkout@v4

Expand All @@ -33,14 +27,14 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- name: Publish $env:GITHUB_REF_NAME to npm registry
- name: Publish ${{ env.GITHUB_REF_NAME }} to npm registry
run: |
npm publish --access public --tag $env:GITHUB_REF_NAME
npm publish --access public --tag ${{ env.GITHUB_REF_NAME }}
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

- name: Publish latest to npm registry
if: ${{ env.is_latest }}
if: ${{ github.ref == 'refs/heads/dist' }}
run: |
npm publish --access public --tag latest
env:
Expand Down

0 comments on commit 0994d5a

Please sign in to comment.