Skip to content

Commit 00da1bd

Browse files
committed
ci: do release from tag
1 parent 9c2151b commit 00da1bd

File tree

3 files changed

+42
-48
lines changed

3 files changed

+42
-48
lines changed

.github/workflows/ci.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
name: node-${{ matrix.node-version }}
11+
strategy:
12+
matrix:
13+
node-version: [18, 20, 22]
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-node@v4
17+
with:
18+
node-version: ${{ matrix.node-version }}
19+
cache: "yarn"
20+
21+
- run: yarn install --frozen-lockfile
22+
- run: yarn ci
23+
24+
release:
25+
runs-on: ubuntu-latest
26+
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
27+
needs: test
28+
permissions:
29+
contents: write
30+
steps:
31+
- uses: actions/checkout@v4
32+
- uses: actions/setup-node@v4
33+
with:
34+
node-version: "22"
35+
registry-url: "https://registry.npmjs.org"
36+
37+
- run: yarn install --frozen-lockfile
38+
- run: yarn ci
39+
40+
- run: npm publish
41+
env:
42+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/publish.yml

-23
This file was deleted.

.github/workflows/test.yml

-25
This file was deleted.

0 commit comments

Comments
 (0)