-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (47 loc) · 1.3 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
# Builds binaries and uploads them to a GitHub release when a v* tag is pushed.
name: Publish release
on:
push:
tags:
- 'v*'
jobs:
create-release:
name: Create release
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create-release.outputs.upload_url }}
steps:
- name: Create release
id: create-release
uses: softprops/action-gh-release@v1
build:
name: Build release binaries
runs-on: ${{ matrix.runner-os }}
needs: create-release
strategy:
matrix:
include:
- runner-os: ubuntu-20.04
rustc-target: "x86_64-unknown-linux-gnu"
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Set up Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.rustc-target }}
- name: Build
run: |
cargo build --release
- name: Create tarball
run: |
mkdir out
cp target/release/oci-interceptor out/
cp README.md LICENSE.md CHANGELOG.md out/
cd out && tar czf oci-interceptor_${suffix}.tar.gz *
env:
suffix: ${{ matrix.rustc-target }}
- name: Upload tarball
uses: softprops/action-gh-release@v1
with:
files: out/*.tar.gz