-
Notifications
You must be signed in to change notification settings - Fork 5
35 lines (32 loc) · 1.02 KB
/
release.yml
File metadata and controls
35 lines (32 loc) · 1.02 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
name: Release
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
env:
CARGO_TERM_COLOR: always
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: get version
run: echo "::set-env name=GIT_TAG_NAME::${GITHUB_REF#refs/tags/}"
- name: setup rust
run: rustup target add x86_64-unknown-linux-musl
- name: build
run: cargo build --release --target x86_64-unknown-linux-musl
- name: package
run: |
name="process-queue-${GIT_TAG_NAME}-x86_64-unknown-linux-musl"
outdir="target/work/$name"
artifactdir="target/artifacts"
mkdir -p "$outdir" "$artifactdir"
cp -t "$outdir" LICENSE README.md target/x86_64-unknown-linux-musl/release/pqueue
strip "$outdir"/pqueue
tar -czvf "${artifactdir}/${name}.tar.gz" -C target/work "$name"
- name: create release
uses: softprops/action-gh-release@v1
with:
files: target/artifacts/*