-
Notifications
You must be signed in to change notification settings - Fork 0
executable file
·47 lines (38 loc) · 1.13 KB
/
build.yml
File metadata and controls
executable file
·47 lines (38 loc) · 1.13 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
name: Build and Release
on:
push:
branches: [ "main", "unit-test" ]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
TARGET: aarch64-unknown-linux-musl
BINARY_NAME: autolinux
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Install Rust Toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ env.TARGET }}
- name: Install Cross
run: cargo install cross
- name: Build Release (Musl Static)
run: cross build --target ${{ env.TARGET }} --release
- name: Prepare Artifact
run: |
mv target/${{ env.TARGET }}/release/${{ env.BINARY_NAME }} ${{ env.BINARY_NAME }}-aarch64
echo "Artifact ready: ${{ env.BINARY_NAME }}-aarch64"
- name: Upload Rolling Release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: false
title: "Latest Build (Auto-generated)"
files: |
${{ env.BINARY_NAME }}-aarch64