Skip to content

Commit 308a9dc

Browse files
authored
[Changed]: Use OIDC to release wrapito library and upgrade to Node 20 (#214)
* chore: use new release flow * chore: update nvm version
1 parent 1d9d2d5 commit 308a9dc

File tree

3 files changed

+995
-634
lines changed

3 files changed

+995
-634
lines changed

.github/workflows/npm-publish.yml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
tags:
77
- 'v*.*.*'
88
- 'v*.*.*-beta*'
9+
permissions:
10+
contents: write
11+
id-token: write
912

1013
jobs:
1114
publish-npm:
@@ -14,32 +17,32 @@ jobs:
1417
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # 6.0.0
1518
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # 6.0.0
1619
with:
17-
node-version: 18
20+
node-version: 20
1821
registry-url: https://registry.npmjs.org/
22+
# Ensure npm 11.5.1 or later is installed
23+
- name: Update npm
24+
run: npm install -g npm@latest
1925
- run: npm ci
2026
- run: npm version --no-git-tag-version ${GITHUB_REF##*/}
2127
- name: Publish package
2228
run: |
2329
if [[ ${{ github.ref }} == *-beta* ]]; then
24-
npm run publish-package:beta
30+
npm run publish-package:beta --access public
2531
else
26-
npm run publish-package
32+
npm run publish-package --access public
2733
fi
28-
env:
29-
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
3034
- name: Build Changelog
3135
id: github_release
3236
uses: mikepenz/release-changelog-builder-action@439f79b5b5428107c7688c1d2b0e8bacc9b8792c #6.0.1
3337
env:
3438
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3539
- name: Create Release
3640
id: create_release
37-
uses: actions/create-release@v1
38-
env:
39-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b #2.5.0
4042
with:
43+
token: ${{ secrets.GITHUB_TOKEN }}
4144
tag_name: ${{ github.ref }}
42-
release_name: Release ${{ github.ref }}
43-
body: ${{steps.github_release.outputs.changelog}}
45+
name: Release ${{ github.ref }}
46+
body: ${{ steps.github_release.outputs.changelog }}
4447
draft: false
45-
prerelease: ${{ contains(github.ref, '-beta') }}
48+
prerelease: ${{ contains(github.ref, '-beta') }}

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v18.18.0
1+
v20.19.5

0 commit comments

Comments
 (0)