-
-
Notifications
You must be signed in to change notification settings - Fork 2
37 lines (36 loc) · 915 Bytes
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Release
on:
pull_request:
branches: main
types:
- closed
jobs:
release:
runs-on: ubuntu-22.04
permissions:
contents: read
id-token: write
# releaseブランチからmainにPRがマージされたら
if: |
github.event.pull_request.merged == true
&& startsWith(github.head_ref, 'release/v')
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
always-auth: true
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm run build
- name: Publish
run: npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}