Skip to content

Commit 08198d2

Browse files
committed
CI: Publish tagged commits to npm
1 parent 4d6eafe commit 08198d2

File tree

3 files changed

+45
-29
lines changed

3 files changed

+45
-29
lines changed

.github/workflows/ci.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: CI
2+
on:
3+
- push
4+
- pull_request
5+
permissions: {}
6+
jobs:
7+
unit:
8+
permissions:
9+
contents: read
10+
runs-on: ubuntu-24.04
11+
name: Node.js ${{ matrix.node-version }}
12+
strategy:
13+
matrix:
14+
node-version:
15+
- '10'
16+
- '12'
17+
- '14'
18+
- '16'
19+
- '18'
20+
- '20'
21+
steps:
22+
- uses: actions/checkout@v4
23+
- uses: actions/setup-node@v4
24+
with:
25+
node-version: ${{ matrix.node-version }}
26+
- run: npm install
27+
- run: npm test
28+
publish:
29+
if: startsWith(github.ref, 'refs/tags/v')
30+
needs:
31+
- unit
32+
permissions:
33+
contents: read
34+
id-token: write
35+
runs-on: ubuntu-24.04
36+
steps:
37+
- uses: actions/checkout@v4
38+
- uses: actions/setup-node@v4
39+
with:
40+
node-version: '24'
41+
- run: npm publish --tag=${{ contains(github.ref, '-rc') && 'next' || 'latest' }}

.github/workflows/integration.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@ name: Integration tests
22
on:
33
- push
44
- pull_request
5+
permissions: {}
56
jobs:
67
integration:
8+
permissions:
9+
contents: read
710
name: ${{ matrix.name }}
811
container: ${{ matrix.container }}
9-
runs-on: ubuntu-latest
12+
runs-on: ubuntu-24.04
1013
strategy:
1114
fail-fast: false
1215
matrix:

.github/workflows/unit.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)