Skip to content

Commit

Permalink
fix(ci): Set tag for wasm publish actions (#8200)
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Oct 31, 2023
1 parent 2503e72 commit 8db80b8
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/publish-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,13 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Tag npm release (default, latest)
run: echo "NPM_TAG=latest" >> $GITHUB_ENV

- name: Tag npm release (nightly)
if: ${{ contains(github.ref, 'nightly') }}
run: echo "NPM_TAG=nightly" >> $GITHUB_EN

- name: Setup node
uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -515,7 +522,7 @@ jobs:
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
run: |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
(cd bindings/binding_core_wasm/pkg && npm publish --access public)
(cd bindings/binding_core_wasm/pkg && npm publish --access public --tag $NPM_TAG)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand All @@ -528,6 +535,13 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Tag npm release (default, latest)
run: echo "NPM_TAG=latest" >> $GITHUB_ENV

- name: Tag npm release (nightly)
if: ${{ contains(github.ref, 'nightly') }}
run: echo "NPM_TAG=nightly" >> $GITHUB_EN

- name: Setup node
uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -557,7 +571,7 @@ jobs:
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
run: |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
(cd bindings/binding_core_wasm/pkg && npm publish --access public)
(cd bindings/binding_core_wasm/pkg && npm publish --access public --tag $NPM_TAG)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 8db80b8

Please sign in to comment.