Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

Commit a3abfb9

Browse files
committed
Release workflow updates
1 parent 50bd327 commit a3abfb9

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

.github/workflows/release-js.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ on:
1515

1616
env:
1717
NEW_RELEASE_TAG: ${{github.ref_name}}
18-
TEST_RUN: ${{startsWith(github.ref_name, 'v0.0.1')}}
18+
NPM_LATEST: ${{!contains(fromJSON('["-rc", "v0.0."]'), github.ref_name)}}
1919

2020
jobs:
2121
publish-npm:
@@ -37,14 +37,13 @@ jobs:
3737

3838
- name: Install dependencies
3939
working-directory: libraries/js
40-
run: npm i
40+
run: npm ci
4141

4242
- name: build
4343
working-directory: libraries/js
4444
run: npm run build
4545

4646
- name: Version Package
47-
if: env.TEST_RUN != 'true'
4847
working-directory: libraries/js/dist
4948
run: npm version --new-version "${{env.NEW_RELEASE_TAG}}" --no-git-tag-version
5049

@@ -53,11 +52,11 @@ jobs:
5352
run: npm config set //registry.npmjs.org/:_authToken ${{secrets.NPM_AUTH_TOKEN}}
5453

5554
- name: Release on NPM @latest
56-
if: env.TEST_RUN != 'true' && steps.is-full-release.outputs.is-full-release == 'true'
55+
if: env.NPM_LATEST == 'true'
5756
working-directory: libraries/js/dist
5857
run: npm publish --tag latest --access public
5958

60-
- name: Release Candidate on NPM
61-
if: env.TEST_RUN != 'true' && steps.is-full-release.outputs.is-full-release != 'true'
59+
- name: Release on NPM without @latest
60+
if: env.NPM_LATEST != 'true'
6261
working-directory: libraries/js/dist
6362
run: npm publish --access public

0 commit comments

Comments
 (0)