-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (48 loc) · 1.38 KB
/
release.yml
File metadata and controls
58 lines (48 loc) · 1.38 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
name: Build and Release
permissions:
contents: write
on:
push:
tags:
- "v*.*.*" # Trigger on version tags
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
platform: [x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu]
steps:
- uses: actions/checkout@v3
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.platform }}
override: true
- name: Install cross-compilation tools for ARM
if: matrix.platform == 'aarch64-unknown-linux-gnu'
run: |
sudo apt update
sudo apt install -y gcc-aarch64-linux-gnu
- name: Build
run: cargo build --release --target ${{ matrix.platform }}
env:
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: KeyResolve-${{ matrix.platform }}
path: target/${{ matrix.platform }}/release/KeyResolve
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: ./dist
- name: Create GitHub Release
uses: ncipollo/release-action@v1
with:
artifacts: ./dist/*
tag: ${{ github.ref_name }}