-
Notifications
You must be signed in to change notification settings - Fork 2
102 lines (84 loc) · 2.74 KB
/
release-cbsd-rs.yaml
File metadata and controls
102 lines (84 loc) · 2.74 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
# Generated with Claude Sonnet 4.6
# by Joao Eduardo Luis <[email protected]> on Mar 31 2026
#
name: Release cbsd-rs
on:
push:
tags:
- "v*"
workflow_dispatch:
inputs:
tag_name:
description: "Tag to build (e.g., v1.0.0)"
required: true
type: string
jobs:
build-cbc:
strategy:
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-musl
target_name: linux-amd64
- os: ubuntu-22.04-arm
target: aarch64-unknown-linux-musl
target_name: linux-aarch64
- os: macos-14
target: aarch64-apple-darwin
target_name: macos-arm64
runs-on: ${{ matrix.os }}
permissions:
contents: write
steps:
- name: Checkout Code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
ref: ${{ inputs.tag_name }}
- name: Install Rust Toolchain
uses: dtolnay/rust-toolchain@aad518f59d88bae90133242f9ddac7f8bbc5dddf # v1.94.1
with:
targets: ${{ matrix.target }}
- name: Install musl Tools
if: runner.os == 'Linux'
run: sudo apt-get install -y musl-tools
- name: Build cbc
working-directory: cbsd-rs
run: cargo build --release --package cbc --target ${{ matrix.target }}
- name: Prepare Artifacts
shell: bash
run: |
TAG_NAME="${{ inputs.tag_name }}"
if [ -z "$TAG_NAME" ]; then
TAG_NAME=${GITHUB_REF#refs/tags/}
fi
echo "Preparing artifacts for tag: $TAG_NAME"
BINARY="cbsd-rs/target/${{ matrix.target }}/release/cbc"
cp "${BINARY}" "cbc-${{ matrix.target_name }}"
- name: Create Release
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0
with:
tag_name: ${{ inputs.tag_name }}
files: |
cbc-${{ inputs.tag_name || github.ref_name }}-${{ matrix.target_name }}
cbc-${{ matrix.target_name }}
generate_release_notes: true
build-release-bundle:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout Code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
ref: ${{ inputs.tag_name }}
- name: Build Config Tarball
run: |
./cbsd-rs/systemd/gen-config-archive.sh
- name: Create Release
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0
with:
tag_name: ${{ inputs.tag_name }}
files: |
cbsd-rs-config.tar
cbsd-rs/systemd/install.sh
generate_release_notes: true