-
-
Notifications
You must be signed in to change notification settings - Fork 180
43 lines (41 loc) · 1.17 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
name: Release
on:
push:
tags:
- '*.*.*'
jobs:
crates:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: publish package to crates
run: |
cargo package
cargo publish --token ${{ secrets.CARGO_TOKEN }}
binaries:
name: Build cargo-tarpaulin binaries for ${{ matrix.target }}
strategy:
matrix:
target:
- x86_64-unknown-linux-gnu
- x86_64-unknown-linux-musl
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
target: ${{ matrix.target }}
toolchain: stable
override: true
- name: build
run: cargo build --release
- name: archive
run: |
GIT_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
tar -C target/${{ matrix.target }}/release -czf $(pwd)/cargo-tarpaulin-${GIT_TAG}-${{ matrix.target }}.tar.gz cargo-tarpaulin
- name: publish release
uses: softprops/action-gh-release@v1
with:
files: cargo-tarpaulin-*.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}