-
-
Notifications
You must be signed in to change notification settings - Fork 37
50 lines (41 loc) · 1.2 KB
/
release.yaml
File metadata and controls
50 lines (41 loc) · 1.2 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
# SPDX-FileCopyrightText: 2023 AerynOS Developers
# SPDX-License-Identifier: MPL-2.0
name: Release
on:
push:
tags:
- v0.*
- v1.*
permissions:
contents: write
env:
CARGO_TERM_COLOR: always
jobs:
build-push:
runs-on: ubuntu-latest
name: Build release binaries
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Install musl
run: sudo apt-get install musl-tools
- name: Install Rust
uses: dtolnay/rust-toolchain@nightly
with:
targets: x86_64-unknown-linux-musl
components: rust-src
- name: Build project
run: |
cargo +nightly -Z build-std=std build --target=x86_64-unknown-linux-musl --profile packaging
strip target/x86_64-unknown-linux-musl/packaging/moss
mkdir release && cd release
tar czvf moss.tar.gz -C ../target/x86_64-unknown-linux-musl/packaging moss
sha256sum moss.tar.gz > moss.tar.gz.sha256
- name: Upload binaries
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: release/moss*
file_glob: true
tag: ${{ github.ref_name }}
release_name: "${{ github.ref_name }}"