fix(ci): Set tag for wasm publish actions (#8200)

This commit is contained in:
Donny/강동윤 2023-10-31 18:27:07 +09:00 committed by GitHub
parent 2503e720cc
commit 8db80b8c28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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:
@ -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 }}
@ -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:
@ -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 }}