Skip to content

Commit fbac6a4

Browse files
committed
ci(release): use Trusted Publisher
1 parent 7ce85dc commit fbac6a4

2 files changed

Lines changed: 29 additions & 11 deletions

File tree

.github/workflows/release.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,19 @@ on:
55
branches:
66
- main
77

8+
concurrency: release
9+
10+
env:
11+
HUSKY: 0
12+
813
permissions:
914
contents: read # for checkout
1015

1116
jobs:
1217
release:
1318
name: Release
1419
runs-on: ubuntu-24.04
20+
environment: release
1521
permissions:
1622
contents: write # to be able to publish a GitHub release
1723
issues: write # to be able to comment on released issues
@@ -29,9 +35,14 @@ jobs:
2935
- name: Use Node.js
3036
uses: actions/setup-node@v6
3137
with:
32-
node-version-file: '.nvmrc'
38+
node-version-file: '.node-version'
3339
cache: 'pnpm'
3440

41+
- name: Install latest npm
42+
run: |
43+
npm install -g npm@latest
44+
npm --version
45+
3546
- name: Installing dependencies
3647
run: pnpm install --frozen-lockfile
3748

@@ -42,6 +53,4 @@ jobs:
4253
- name: Release
4354
env:
4455
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
46-
NPM_CONFIG_PROVENANCE: true
47-
run: npx --no semantic-release
56+
run: pnpm exec semantic-release

release.config.mjs

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,33 @@ export default {
2020
release: false,
2121
},
2222
{
23-
type: 'chore',
24-
scope: 'spelling',
23+
type: 'docs',
2524
release: 'patch',
2625
},
2726
{
28-
type: 'chore',
29-
scope: 'docs',
27+
type: 'refactor',
3028
release: 'patch',
3129
},
3230
{
33-
type: 'refactor',
31+
type: 'chore',
32+
scope: 'spelling',
3433
release: 'patch',
3534
},
3635
],
3736
},
3837
],
3938
'@semantic-release/release-notes-generator',
40-
'@semantic-release/npm',
41-
'@semantic-release/github',
39+
[
40+
'@semantic-release/npm',
41+
{
42+
provenance: true,
43+
},
44+
],
45+
[
46+
'@semantic-release/github',
47+
{
48+
addReleases: 'bottom',
49+
},
50+
],
4251
],
4352
};

0 commit comments

Comments
 (0)