-
Notifications
You must be signed in to change notification settings - Fork 19
88 lines (86 loc) · 2.15 KB
/
builds.yml
File metadata and controls
88 lines (86 loc) · 2.15 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
76
77
78
79
80
81
82
83
84
85
86
87
88
name: builds
on:
push:
tags:
- v*
pull_request:
branches:
- main
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
[
windows-2025,
windows-11-arm,
macos-13,
macos-15,
ubuntu-22.04,
ubuntu-22.04-arm,
]
node: [22, 24]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- run: corepack enable
- run: pnpm i --frozen-lockfile
env:
npm_config_build_from_source: true
- run: pnpm tsd
- run: pnpm test
- run: pnpm prebuild
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-${{ matrix.node }}-binary
path: "prebuilds/**/*.tar.gz"
alpine:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-22.04-arm]
node: [22, 24]
fail-fast: true
container:
image: node:${{ matrix.node }}-alpine
steps:
- uses: actions/checkout@v4
- run: |
apk add --no-cache python3 make g++
- run: corepack enable
- run: pnpm i --frozen-lockfile
env:
npm_config_build_from_source: true
- run: pnpm tsd
- run: pnpm test
- run: pnpm prebuild
- uses: actions/upload-artifact@v4
with:
name: alpine-${{ matrix.node }}-binary
path: "prebuilds/**/*.tar.gz"
deploy:
runs-on: ubuntu-latest
needs: [alpine, build]
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24
- uses: actions/download-artifact@v4
with:
path: prebuilds
- id: vars
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
- uses: eine/tip@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.vars.outputs.tag }}
files: |
./prebuilds/**/*.tar.gz