Skip to content

Commit 0a48b61

Browse files
committed
Update GitHub Actions workflows and configuration
- Changed "branch" to "branches" in .releaserc.json for correct configuration. - Updated permissions in the publish-to-npm workflow to include issues. - Upgraded actions/checkout and actions/setup-node to version 4. - Changed node version to 22.x and updated the release command to use the latest semantic-release packages.
1 parent aed0127 commit 0a48b61

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

.github/workflows/publish-to-npm-alpha.yml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,37 +4,42 @@ on:
44
push:
55
branches: ["master"]
66

7-
permissions:
7+
permissions:
88
id-token: write
99
contents: write
10+
issues: write
1011

1112
jobs:
1213
publish-to-npm:
1314
runs-on: ubuntu-latest
1415
steps:
1516
- name: Pull code
16-
uses: actions/checkout@v1
17+
uses: actions/checkout@v4
1718
- name: Set up node.js
18-
uses: actions/setup-node@master
19+
uses: actions/setup-node@v4
1920
with:
20-
node-version: '16.x'
21+
node-version: "22.x"
22+
registry-url: "https://registry.npmjs.org"
2123
- name: Install dependencies
2224
run: yarn
23-
- name: build
25+
- name: Build
2426
run: yarn build
2527
- name: Release
2628
env:
2729
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
29-
run: npx 'semantic-release@^18.0.1'
30+
run: npx -p @semantic-release/npm@latest -p @semantic-release/github@latest -p @semantic-release/commit-analyzer@latest -p @semantic-release/release-notes-generator@latest semantic-release@latest
3031
test:
3132
runs-on: ubuntu-latest
3233
steps:
3334
- name: Pull code
34-
uses: actions/checkout@v1
35+
uses: actions/checkout@v4
36+
- name: Set up node.js
37+
uses: actions/setup-node@v4
38+
with:
39+
node-version: "22.x"
3540
- name: Install Dependencies
3641
run: yarn
3742
- name: Run Tests
3843
run: yarn test
3944
- name: codecov
40-
uses: codecov/codecov-action@v1
45+
uses: codecov/codecov-action@v4

.releaserc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"branch": ["master"],
2+
"branches": ["master"],
33
"tagFormat": "v${version}",
44
"dryRun": false,
55
"debug": true,

0 commit comments

Comments
 (0)