-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (47 loc) · 1.19 KB
/
release.yml
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
name: Rust
on:
push:
tags:
- 'v*.*.*'
env:
CARGO_TERM_COLOR: always
jobs:
build:
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
strategy:
matrix:
target: [aarch64-unknown-linux-gnu, aarch64-unknown-linux-musl, x86_64-unknown-linux-gnu, x86_64-unknown-linux-musl]
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
target: ${{ matrix.target }}
- name: Run Tests
uses: actions-rs/cargo@v1
with:
command: test
args: --all
- name: Build Target
uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --release --target ${{ matrix.target }}
- name: Package
shell: bash
run: |
cd target/${{ matrix.target }}/release
tar czvf ../../../dbterra-${{ matrix.target }}.tar.gz dbterra
cd -
- name: Publish
uses: softprops/action-gh-release@v1
with:
files: 'dbterra*'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}