Skip to content

Commit 73b4d13

Browse files
committed
ci: setup trusted publishing
1 parent 1f4ea8b commit 73b4d13

7 files changed

Lines changed: 66 additions & 59 deletions

File tree

.changeset/tidy-tips-grow.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'starlight-changelogs': patch
3+
---
4+
5+
Setups trusted publishing using OpenID Connect (OIDC) authentication — no code changes.

.github/workflows/autofix.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: autofix.ci
22

3+
ppermissions: {}
4+
35
on:
46
push:
57
branches:
@@ -9,9 +11,6 @@ on:
911
- main
1012
workflow_call:
1113

12-
permissions:
13-
contents: read
14-
1514
concurrency:
1615
cancel-in-progress: true
1716
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
@@ -20,15 +19,19 @@ jobs:
2019
autofix:
2120
name: Format code
2221
runs-on: ubuntu-latest
22+
permissions:
23+
contents: read
2324
steps:
2425
- name: Checkout
25-
uses: actions/checkout@v4
26+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
27+
with:
28+
persist-credentials: false
2629

2730
- name: Install pnpm
28-
uses: pnpm/action-setup@v4
31+
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
2932

3033
- name: Install Node.js
31-
uses: actions/setup-node@v4
34+
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
3235
with:
3336
cache: pnpm
3437
node-version: 18

.github/workflows/integration.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: integration
22

3+
permissions: {}
4+
35
on:
46
push:
57
branches:
@@ -19,13 +21,15 @@ jobs:
1921
runs-on: ubuntu-latest
2022
steps:
2123
- name: Checkout
22-
uses: actions/checkout@v4
24+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
25+
with:
26+
persist-credentials: false
2327

2428
- name: Install pnpm
25-
uses: pnpm/action-setup@v4
29+
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
2630

2731
- name: Install Node.js
28-
uses: actions/setup-node@v4
32+
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
2933
with:
3034
cache: pnpm
3135
node-version: 18

.github/workflows/release.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
name: release
22

3+
permissions: {}
34
on:
45
push:
56
branches:
@@ -16,29 +17,30 @@ jobs:
1617
pull-requests: write
1718
steps:
1819
- name: Checkout
19-
uses: actions/checkout@v4
20+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2021
with:
2122
fetch-depth: 0
23+
persist-credentials: false
2224

2325
- name: Install pnpm
24-
uses: pnpm/action-setup@v4
26+
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
2527

2628
- name: Install Node.js
27-
uses: actions/setup-node@v4
29+
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
2830
with:
29-
cache: pnpm
30-
node-version: 18
31+
node-version: 24
32+
package-manager-cache: false
3133

3234
- name: Install dependencies
3335
run: pnpm install
3436

3537
- name: Create Release Pull Request or Publish
36-
uses: changesets/action@v1
38+
uses: changesets/action@e0145edc7d9d8679003495b11f87bd8ef63c0cba # v1.5.3
3739
with:
3840
version: pnpm run version
3941
publish: pnpm changeset publish
4042
commit: 'ci: release'
4143
title: 'ci: release'
4244
env:
4345
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
46+
NPM_TOKEN: '' # https://github.com/changesets/changesets/issues/1152#issuecomment-3190884868

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"devDependencies": {
1515
"@astrojs/check": "^0.9.4",
1616
"@changesets/changelog-github": "^0.5.1",
17-
"@changesets/cli": "^2.29.5",
17+
"@changesets/cli": "^2.29.7",
1818
"@hideoo/eslint-config": "^4.0.0",
1919
"@hideoo/prettier-config": "^2.0.0",
2020
"@hideoo/tsconfig": "^2.0.1",

packages/starlight-changelogs/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@
3838
},
3939
"packageManager": "pnpm@10.13.1",
4040
"publishConfig": {
41-
"access": "public",
42-
"provenance": true
41+
"access": "public"
4342
},
4443
"sideEffects": false,
4544
"keywords": [

pnpm-lock.yaml

Lines changed: 34 additions & 40 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)