forked from lovell/sharp-libvips
-
Notifications
You must be signed in to change notification settings - Fork 0
116 lines (116 loc) · 3.44 KB
/
ci.yml
File metadata and controls
116 lines (116 loc) · 3.44 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: CI
on:
push:
branches:
- main
- 'temp-*'
pull_request:
branches:
- main
types:
- opened
- reopened
- synchronize
- ready_for_review
permissions: {}
jobs:
check-latest-versions:
permissions:
contents: read
runs-on: 'ubuntu-24.04'
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Check latest versions
run: ./check-latest-versions.sh && git diff --quiet
build:
permissions:
contents: read
name: build-${{ matrix.platform }}
runs-on: ${{ matrix.os }}
needs: check-latest-versions
strategy:
fail-fast: false
matrix:
include:
- os: 'ubuntu-24.04'
platform: 'linux-x64'
- os: 'ubuntu-24.04'
platform: 'linux-armv6'
- os: 'ubuntu-24.04'
platform: 'linuxmusl-x64'
- os: 'ubuntu-24.04'
platform: 'linux-ppc64le'
- os: 'ubuntu-24.04'
platform: 'linux-riscv64'
- os: 'ubuntu-24.04'
platform: 'linux-s390x'
- os: 'ubuntu-24.04'
platform: 'dev-wasm32'
- os: 'ubuntu-24.04'
platform: 'win32-ia32'
- os: 'ubuntu-24.04'
platform: 'win32-x64'
- os: 'ubuntu-24.04'
platform: 'win32-arm64v8'
- os: 'macos-15-intel'
platform: 'darwin-x64'
- os: 'macos-15'
platform: 'darwin-arm64v8'
- os: 'ubuntu-24.04-arm'
platform: 'linux-arm64v8'
- os: 'ubuntu-24.04-arm'
platform: 'linuxmusl-arm64v8'
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install dependencies (macOS)
if: runner.os == 'macOS'
run: |
pipx install meson
brew install automake nasm
- name: Build ${{ matrix.platform }}
run: ./build.sh ${{ matrix.platform }}
- name: Upload ${{ matrix.platform }} artifact
uses: actions/upload-artifact@v6
with:
name: build-${{ matrix.platform }}
path: '*.tar.gz'
compression-level: 0
retention-days: 1
if-no-files-found: error
populate-and-publish-npm-workspace:
permissions:
contents: write
id-token: write
needs: build
runs-on: ubuntu-24.04
steps:
- name: Install Node.js
uses: actions/setup-node@v6
with:
node-version: '24'
- name: Checkout
uses: actions/checkout@v6
- name: Download build artifacts
uses: actions/download-artifact@v7
with:
merge-multiple: true
- name: Populate npm workspace
run: ./populate-npm-workspace.sh
- name: Create npm workspace tarball
run: tar -vcaf npm-workspace.tar.xz -C npm .
- name: Generate release notes
run: ./generate-release-notes.sh
- name: Create GitHub release for tag
if: startsWith(github.ref, 'refs/tags/v')
uses: ncipollo/release-action@v1
with:
artifacts: npm-workspace.tar.xz
artifactContentType: application/x-xz
bodyFile: release-notes.md
prerelease: ${{ contains(github.ref, '-rc') }}
makeLatest: ${{ !contains(github.ref, '-rc') }}
- name: Publish npm packages
if: startsWith(github.ref, 'refs/tags/v')
run: cd npm && npm publish --workspaces --tag=${{ contains(github.ref, '-rc') && 'next' || 'latest' }}