-
Notifications
You must be signed in to change notification settings - Fork 357
75 lines (71 loc) · 2.34 KB
/
Copy pathci.yml
File metadata and controls
75 lines (71 loc) · 2.34 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: CI
on:
push:
branches: ['main']
pull_request:
branches: ['main']
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
integrity:
# prevents this action from running on forks
if: github.repository_owner == 'vercel'
runs-on: ubuntu-latest
strategy:
matrix:
node: [ 20 ]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Enable pnpm
run: corepack enable pnpm
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: 'pnpm'
- name: Check pnpm
run: pnpm --version
- run: pnpm install --frozen-lockfile
- run: pnpm ci-check
test:
# prevents this action from running on forks
if: github.repository_owner == 'vercel'
name: Node.js ${{ matrix.node }} on ${{ matrix.os }}
timeout-minutes: 5
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
node: [18, 20, 22]
runs-on: ${{ matrix.os }}
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # required for npm trusted publishing (OIDC)
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Enable pnpm
run: corepack enable pnpm
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: 'pnpm'
- name: Check pnpm
run: pnpm --version
- run: pnpm install --frozen-lockfile
- run: pnpm build
- run: pnpm test
- name: Update npm for trusted publishing
# actions/setup-node ships npm 10.x; OIDC trusted publishing needs >= 11.5.1
if: matrix.os == 'ubuntu-latest' && matrix.node == 22 && github.event_name == 'push' && github.ref == 'refs/heads/main'
run: npm install -g npm@latest
- name: Maybe Release
if: matrix.os == 'ubuntu-latest' && matrix.node == 22 && github.event_name == 'push' && github.ref == 'refs/heads/main'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: pnpm dlx semantic-release@25.0.5