Skip to content

Commit 208c7af

Browse files
authored
ci(release)!: trusted publishing (#123)
1 parent cce58f2 commit 208c7af

2 files changed

Lines changed: 5 additions & 8 deletions

File tree

.github/workflows/release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,21 @@ jobs:
1010
name: Release
1111
runs-on: ubuntu-latest
1212
permissions:
13+
id-token: write
1314
contents: write
1415
steps:
1516
- name: Checkout repo
16-
uses: actions/checkout@v4
17+
uses: actions/checkout@v6
1718
with:
1819
fetch-depth: 0
1920

20-
- uses: pnpm/action-setup@v4
21+
- uses: pnpm/action-setup@v5
2122

2223
- name: Setup Node.js 22.14.0
23-
uses: actions/setup-node@v4
24+
uses: actions/setup-node@v6
2425
with:
2526
node-version: 22.14.0
26-
registry-url: 'https://registry.npmjs.org'
27+
registry-url: "https://registry.npmjs.org"
2728
cache: pnpm
2829

2930
- name: Install dependencies
@@ -32,5 +33,4 @@ jobs:
3233
- name: Release
3334
run: pnpm release
3435
env:
35-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3636
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

scripts/release.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@ import { Octokit } from "@octokit/core";
33

44
if (!execSync("git --version").includes("git version")) {
55
console.error("Git not installed");
6-
// @ts-expect-error
76
process.exit(1);
87
}
98

10-
// @ts-expect-error
119
const DRY_RUN = !process.env.GITHUB_ACTIONS;
1210

1311
if (DRY_RUN) console.log("DRY RUN\n");
@@ -105,7 +103,6 @@ console.log(`Creating tag v${nextVersion} for hash ${currentHash}`);
105103

106104
if (!DRY_RUN) {
107105
const octokit = new Octokit({
108-
// @ts-expect-error
109106
auth: process.env.GITHUB_TOKEN,
110107
});
111108

0 commit comments

Comments
 (0)