-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (39 loc) · 1.14 KB
/
Copy pathrelease.yml
File metadata and controls
47 lines (39 loc) · 1.14 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: Release
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
build:
strategy:
matrix:
include:
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
- target: x86_64-apple-darwin
os: macos-latest
- target: aarch64-apple-darwin
os: macos-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install musl tools
if: contains(matrix.target, 'musl')
run: sudo apt-get update && sudo apt-get install -y musl-tools
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Build
run: cargo build --release --target ${{ matrix.target }}
- name: Package
run: |
mkdir dek-${{ matrix.target }}
cp target/${{ matrix.target }}/release/dek dek-${{ matrix.target }}/
tar czf dek-${{ matrix.target }}.tar.gz dek-${{ matrix.target }}
- name: Upload to release
uses: softprops/action-gh-release@v2
with:
files: dek-${{ matrix.target }}.tar.gz