-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (38 loc) · 1.13 KB
/
release.yml
File metadata and controls
46 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
name: Release
on:
push:
tags:
- '*'
jobs:
release:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- build: linux
os: ubuntu-20.04 ## older ubuntu to avoid messing with glibc version
target: x86_64-unknown-linux-gnu
steps:
- name: checkout
uses: actions/checkout@v3
- name: setup rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
target: ${{ matrix.target }}
- name: build binary
run: |
cargo build --verbose --release --target ${{ matrix.target }}
ls target/${{ matrix.target }}/release/
- name: build archive
if: matrix.build == 'linux'
run: |
export PAYLOAD_GEN=payload_gen-${{ matrix.target }}.tgz
tar -czf $PAYLOAD_GEN -C "./target/${{ matrix.target }}/release/" payload_gen
echo "PAYLOAD_GEN=$PAYLOAD_GEN" >> $GITHUB_ENV
- name: release
uses: ncipollo/release-action@v1
with:
artifacts: "${{ env.PAYLOAD_GEN}}"
artifactErrorsFailBuild: true
allowUpdates: true