Skip to content

Commit cbc5a21

Browse files
committed
chore: support provenance
1 parent f45b569 commit cbc5a21

File tree

4 files changed

+28
-32
lines changed

4 files changed

+28
-32
lines changed

.github/actions/initialize/action.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: "initialize"
2+
3+
runs:
4+
using: "composite"
5+
steps:
6+
- name: Setup Git Config
7+
run: |
8+
git config --global core.autocrlf false
9+
git config --global core.eol lf
10+
git config --global user.email "actions@gihub.com"
11+
git config --global user.name "gh-actions"
12+
shell: bash

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99

1010
strategy:
1111
matrix:
12-
node-version: [20.x]
12+
node-version: [22.x]
1313
os: [windows-latest, ubuntu-latest]
1414

1515
steps:
@@ -25,7 +25,7 @@ jobs:
2525
version: 9.10.0
2626
- uses: actions/setup-node@v4
2727
with:
28-
node-version: "20.x"
28+
node-version: "22.x"
2929
cache: "pnpm"
3030
- run: pnpm i --frozen-lockfile
3131
- name: Use Node.js ${{ matrix.node-version }}

.github/workflows/release.yml

Lines changed: 13 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,66 +4,52 @@ on:
44
release:
55
types: [created]
66

7+
permissions:
8+
id-token: write
9+
710
jobs:
811
build:
912
runs-on: ubuntu-latest
10-
environment: npm
11-
permissions:
12-
contents: read
13-
id-token: write
1413
steps:
15-
- name: Setup Git Config
16-
run: |
17-
git config --global core.autocrlf false
18-
git config --global core.eol lf
19-
git config --global user.email "actions@gihub.com"
20-
git config --global user.name "gh-actions"
2114
- uses: actions/checkout@v3
2215
with:
2316
ref: main
17+
- uses: ./.github/actions/initialize
2418
- uses: pnpm/action-setup@v4
2519
with:
2620
version: 9.10.0
27-
- uses: actions/setup-node@v4
21+
- uses: actions/setup-node@v2
2822
with:
29-
node-version: "20.x"
23+
node-version: "22.x"
3024
registry-url: https://npm.pkg.github.com
3125
scope: "@Himenon"
3226
cache: "pnpm"
3327
- run: pnpm i --frozen-lockfile
3428
- run: |
3529
pnpm build
36-
env:
37-
CI: true
3830
3931
release-github-registry:
4032
runs-on: ubuntu-latest
4133
steps:
42-
- name: Setup Git Config
43-
run: |
44-
git config --global core.autocrlf false
45-
git config --global core.eol lf
46-
git config --global user.email "actions@gihub.com"
47-
git config --global user.name "gh-actions"
4834
- uses: actions/checkout@v3
4935
with:
5036
ref: main
37+
- uses: ./.github/actions/initialize
5138
- uses: pnpm/action-setup@v4
5239
with:
5340
version: 9.10.0
54-
- uses: actions/setup-node@v4
41+
- uses: actions/setup-node@v2
5542
with:
56-
node-version: "20.x"
43+
node-version: "22.x"
5744
registry-url: https://npm.pkg.github.com
5845
scope: "@Himenon"
5946
cache: "pnpm"
6047
- run: pnpm install
6148
- run: |
6249
pnpm build
63-
pnpm release:github:registry
50+
pnpm run release:github:registry
6451
env:
6552
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66-
CI: true
6753
6854
release-npm-registry:
6955
runs-on: ubuntu-latest
@@ -74,15 +60,13 @@ jobs:
7460
- uses: pnpm/action-setup@v4
7561
with:
7662
version: 9.10.0
77-
- uses: actions/setup-node@v4
63+
- uses: actions/setup-node@v2
7864
with:
79-
node-version: "20.x"
65+
node-version: "22.x"
8066
registry-url: "https://registry.npmjs.org"
8167
cache: "pnpm"
8268
- run: pnpm install
8369
- run: pnpm build
84-
env:
85-
CI: true
86-
- run: NPM_CONFIG_PROVENANCE=true pnpm release:npm:registry
70+
- run: NPM_CONFIG_PROVENANCE=true pnpm run release:npm:registry
8771
env:
8872
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/versionUp.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
version: 9.10.0
2424
- uses: actions/setup-node@v4
2525
with:
26-
node-version: "20.x"
26+
node-version: "22.x"
2727
cache: "pnpm"
2828
- run: pnpm i --frozen-lockfile
2929
- name: Auto version update

0 commit comments

Comments
 (0)