-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (65 loc) · 1.82 KB
/
Copy pathrelease.yml
File metadata and controls
82 lines (65 loc) · 1.82 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
name: Release
on:
push:
branches:
- main
paths-ignore:
- README.md
workflow_dispatch:
permissions:
contents: write
issues: write
pull-requests: write
concurrency:
group: release
cancel-in-progress: true
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Java
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: "17"
- name: Set up Rust
uses: dtolnay/rust-toolchain@nightly
with:
targets: aarch64-apple-darwin, x86_64-pc-windows-gnu
- name: Cache Rust artifacts
uses: Swatinem/rust-cache@v2
with:
workspaces: patch-tools -> target
- name: Install build tools
run: |
sudo apt update
sudo apt install -y just protobuf-compiler
- name: Set up Zig
uses: mlugg/setup-zig@v2
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: "lts/*"
- name: Install cargo-zigbuild
run: cargo install cargo-zigbuild --locked
- name: Install semantic-release
run: npm install
- name: Build release artifacts
env:
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: just all
- name: Build macOS arm64 artifact
run: cargo zigbuild --release --target aarch64-apple-darwin
working-directory: patch-tools
- name: Build Windows x86_64 artifact
run: cargo zigbuild --release --target x86_64-pc-windows-gnu
working-directory: patch-tools
- name: Run semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm run release