-
Notifications
You must be signed in to change notification settings - Fork 13
80 lines (78 loc) · 2.01 KB
/
builds.yml
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
name: builds
on:
push:
tags:
- v*
pull_request:
branches:
- main
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-2019, macos-12, ubuntu-20.04]
node: [18, 20, 21]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- uses: actions/setup-node@v3
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 package
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}-${{ matrix.node }}-binary
path: 'build/**/*.tar.gz'
alpine:
runs-on: ubuntu-20.04
strategy:
matrix:
node: [18, 20, 21]
fail-fast: true
container:
image: node:${{ matrix.node }}-alpine
steps:
- uses: actions/checkout@v3
- 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 build
- run: pnpm test
- run: pnpm package
- uses: actions/upload-artifact@v3
with:
name: alpine-${{ matrix.node }}-binary
path: 'build/**/*.tar.gz'
deploy:
runs-on: ubuntu-20.04
needs: [alpine, build]
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
- uses: actions/download-artifact@v2
with:
path: build
- 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: |
./build/*/stage/marudor/libxmljs2/releases/download/*/*