mirror of
https://github.com/swc-project/swc.git
synced 2024-12-25 06:36:08 +03:00
fix(ci): Set tag
for wasm publish actions (#8200)
This commit is contained in:
parent
2503e720cc
commit
8db80b8c28
18
.github/workflows/publish-core.yml
vendored
18
.github/workflows/publish-core.yml
vendored
@ -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 }}
|
||||
|
Loading…
Reference in New Issue
Block a user