Skip to content

Commit b9089fb

Browse files
authored
Merge pull request #3 from microcmsio/feat/node-24
Nodeのアップデート + NPM Publishの方法をセキュアなものに変更
2 parents 8954921 + c4096e1 commit b9089fb

File tree

4 files changed

+29
-18
lines changed

4 files changed

+29
-18
lines changed

.github/workflows/node.js.yml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@ name: Node.js CI
55

66
on:
77
push:
8-
branches: [ "main" ]
8+
branches: ["main"]
99
pull_request:
10-
branches: [ "main" ]
10+
branches: ["main"]
1111

1212
jobs:
1313
build:
14-
1514
runs-on: ubuntu-latest
1615

1716
strategy:
@@ -20,12 +19,12 @@ jobs:
2019
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
2120

2221
steps:
23-
- uses: actions/checkout@v4
24-
- name: Use Node.js ${{ matrix.node-version }}
25-
uses: actions/setup-node@v4
26-
with:
27-
node-version: ${{ matrix.node-version }}
28-
cache: 'npm'
29-
- run: npm ci
30-
- run: npm run build
31-
- run: npm test
22+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
23+
- name: Use Node.js ${{ matrix.node-version }}
24+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
25+
with:
26+
node-version: ${{ matrix.node-version }}
27+
cache: "npm"
28+
- run: npm ci
29+
- run: npm run build
30+
- run: npm test

.github/workflows/npm-publish.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,20 @@ on:
77
release:
88
types: [created]
99

10+
permissions:
11+
id-token: write # Required for OIDC
12+
contents: read
13+
1014
jobs:
1115
publish-npm:
1216
runs-on: ubuntu-latest
1317
steps:
14-
- uses: actions/checkout@v4
15-
- uses: actions/setup-node@v4
18+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
19+
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
1620
with:
17-
node-version: 22
21+
node-version: 24
1822
registry-url: https://registry.npmjs.org/
1923
- run: npm ci
2024
- run: npm test
2125
- run: npm run build
2226
- run: npm publish
23-
env:
24-
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
nodejs 22.12.0
1+
nodejs 24.11.0

package-lock.json

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

0 commit comments

Comments
 (0)