Skip to content

Commit 0d102fb

Browse files
update wc release workflow (#1193)
1 parent def5aef commit 0d102fb

File tree

1 file changed

+18
-9
lines changed

1 file changed

+18
-9
lines changed

.github/workflows/release-wc-and-playground.yml

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,27 @@ jobs:
1010
webcomponent:
1111
name: Release Web-component
1212
runs-on: ubuntu-latest
13+
permissions:
14+
contents: read
15+
id-token: write
16+
1317
steps:
1418
- name: Checkout repository
15-
uses: actions/checkout@v3
19+
uses: actions/checkout@v4
1620
with:
1721
# target branch of release. More info https://docs.github.com/en/rest/reference/repos#releases
1822
# in case release is created from release branch then we need to checkout from given branch
1923
# if @semantic-release/github is used to publish, the minimum version is 7.2.0 for proper working
2024
ref: ${{ github.event.release.target_commitish }}
21-
- name: Check package-lock version
25+
- name: Determine what node version to use
2226
uses: asyncapi/.github/.github/actions/get-node-version-from-package-lock@master
27+
with:
28+
node-version: ${{ vars.NODE_VERSION }}
2329
id: lockversion
2430
- name: Setup Node.js
25-
uses: actions/setup-node@v3
31+
uses: actions/setup-node@v4
2632
with:
33+
registry-url: "https://registry.npmjs.org"
2734
node-version: "${{ steps.lockversion.outputs.version }}"
2835
cache: 'npm'
2936
cache-dependency-path: '**/package-lock.json'
@@ -42,18 +49,18 @@ jobs:
4249
run: VERSION=${{github.event.release.tag_name}} npm run bump:webcomp:version
4350
- name: Release web-component to NPM (@latest tag)
4451
if: github.event.release.target_commitish == 'master'
45-
uses: JS-DevTools/npm-publish@5a85faf05d2ade2d5b6682bfe5359915d5159c6c # using 2.2.1 version https://github.com/JS-DevTools/npm-publish/releases/tag/v2.2.1
52+
uses: JS-DevTools/npm-publish@1fe17a093199d8fabed85cbcc6f0f79eb06470da # using 4.1.0 version https://github.com/JS-DevTools/npm-publish/releases/tag/v4.1.0
4653
with:
47-
token: ${{ secrets.NPM_TOKEN }}
4854
package: ./web-component/package.json
4955
access: public
56+
provenance: true
5057
- name: Release web-component to NPM (feature branch tag)
5158
if: github.event.release.target_commitish != 'master'
52-
uses: JS-DevTools/npm-publish@5a85faf05d2ade2d5b6682bfe5359915d5159c6c # using 2.2.1 version https://github.com/JS-DevTools/npm-publish/releases/tag/v2.2.1
59+
uses: JS-DevTools/npm-publish@1fe17a093199d8fabed85cbcc6f0f79eb06470da # using 4.1.0 version https://github.com/JS-DevTools/npm-publish/releases/tag/v4.1.0
5360
with:
54-
token: ${{ secrets.NPM_TOKEN }}
5561
package: ./web-component/package.json
5662
access: public
63+
provenance: true
5764
tag: github.event.release.target_commitish
5865
- if: failure() # Only, on failure, send a message on the 94_bot-failing-ci slack channel
5966
name: Report workflow run status to Slack
@@ -70,17 +77,19 @@ jobs:
7077
runs-on: ubuntu-latest
7178
steps:
7279
- name: Checkout repository
73-
uses: actions/checkout@v3
80+
uses: actions/checkout@v4
7481
with:
7582
# target branch of release. More info https://docs.github.com/en/rest/reference/repos#releases
7683
# in case release is created from release branch then we need to checkout from given branch
7784
# if @semantic-release/github is used to publish, the minimum version is 7.2.0 for proper working
7885
ref: ${{ github.event.release.target_commitish }}
7986
- name: Check package-lock version
8087
uses: asyncapi/.github/.github/actions/get-node-version-from-package-lock@master
88+
with:
89+
node-version: ${{ vars.NODE_VERSION }}
8190
id: lockversion
8291
- name: Setup Node.js
83-
uses: actions/setup-node@v3
92+
uses: actions/setup-node@v4
8493
with:
8594
node-version: "${{ steps.lockversion.outputs.version }}"
8695
cache: 'npm'

0 commit comments

Comments
 (0)