Skip to content

Commit 245573a

Browse files
committed
add publish workflow.
... ...
1 parent 64b1cb8 commit 245573a

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/publish.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# https://docs.npmjs.com/trusted-publishers#github-actions-configuration
2+
name: publish
3+
4+
on:
5+
push:
6+
tags:
7+
- 'v*'
8+
9+
permissions:
10+
contents: read
11+
id-token: write # Required for OIDC
12+
13+
jobs:
14+
npm:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Harden the runner (Audit all outbound calls)
19+
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
20+
with:
21+
egress-policy: audit
22+
23+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
24+
25+
- name: Install pnpm
26+
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
27+
28+
- name: Use Node.js
29+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
30+
with:
31+
node-version: lts/*
32+
cache: "pnpm"
33+
34+
- name: Install dependencies
35+
run: npm i -g npm@latest && pnpm i
36+
37+
- name: Publish
38+
run: pnpm publish

0 commit comments

Comments
 (0)