-
-
Notifications
You must be signed in to change notification settings - Fork 6
99 lines (87 loc) · 3.05 KB
/
Copy pathboil_release.yaml
File metadata and controls
99 lines (87 loc) · 3.05 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
---
name: Release boil
on:
push:
tags:
- "boil-[0-9]+.[0-9]+.[0-9]+**"
permissions: {}
env:
RUST_TOOLCHAIN_VERSION: 1.95.0
RELEASE_TAG: ${{ github.ref_name }}
jobs:
create-release:
name: Create Draft Release
runs-on: ubuntu-latest
permissions:
# Write is needed to draft the release
# See https://github.com/softprops/action-gh-release/blob/153bb8e04406b158c6c84fc1615b65b24149a1fe/README.md?plain=1#L281
contents: write
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
fetch-depth: 0
- name: Generate Changelog
id: changelog
uses: orhun/git-cliff-action@e16f179f0be49ecdfe63753837f20b9531642772 # v4.7.0
with:
config: rust/boil/cliff.toml
args: --latest --strip header
- name: Create Draft Release
env:
RELEASE_NOTES: ${{ steps.changelog.outputs.content }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: gh release create --draft --verify-tag --latest --notes "$RELEASE_NOTES" "RELEASE_TAG"
build:
name: Build boil
needs: [create-release]
strategy:
fail-fast: false
matrix:
targets:
- { target: aarch64-unknown-linux-gnu, os: ubuntu-24.04-arm }
- { target: x86_64-unknown-linux-gnu, os: ubuntu-latest }
- { target: aarch64-apple-darwin, os: macos-latest }
runs-on: ${{ matrix.targets.os }}
permissions:
# Write is needed to upload artifacts to the release
# See https://github.com/softprops/action-gh-release/blob/153bb8e04406b158c6c84fc1615b65b24149a1fe/README.md?plain=1#L281
contents: write
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: Setup Rust Toolchain
env:
RUST_TARGETS: ${{ matrix.targets.target }}
shell: bash
run: rustup toolchain install "${RUST_TOOLCHAIN_VERSION}" --target "${RUST_TARGETS}"
- name: Build Binary
env:
TARGET: ${{ matrix.targets.target }}
run: cargo build --target "$TARGET" --release --package boil
- name: Rename Binary
env:
TARGET: ${{ matrix.targets.target }}
run: mv "target/$TARGET/release/boil" "boil-$TARGET"
- name: Upload Artifact to Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: gh release upload "RELEASE_TAG" boil-${{ matrix.targets.target }}
finish-release:
needs: [build]
runs-on: ubuntu-latest
permissions:
# Write is needed to finalize the release
# See https://github.com/softprops/action-gh-release/blob/153bb8e04406b158c6c84fc1615b65b24149a1fe/README.md?plain=1#L281
contents: write
steps:
- name: Finish Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: gh release edit --draft=false "$RELEASE_TAG"