-
Notifications
You must be signed in to change notification settings - Fork 18
56 lines (53 loc) · 1.57 KB
/
automated_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
51
52
53
54
55
56
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
name: Automated Release
env:
CARGO_TERM_COLOR: always
jobs:
release:
name: build-release-assets
runs-on: ubuntu-20.04
steps:
# Setup Rust Environment
- name: setup-rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
# Checkout repository code
- name: checkout-code
uses: actions/checkout@v2
- name: "Check version"
run: ./check_version.sh
# Rust Cache
- name: rust-cache
uses: actions/cache@v2
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
steward/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('steward/Cargo.lock') }}
# Install OpenSSL dependencies
- name: install-packages
run: sudo apt-get install -y libssl-dev musl-tools
# Build Rust Artifacts
- name: build-rust
run: |
rustup target add x86_64-unknown-linux-musl
cargo build --target x86_64-unknown-linux-musl --release --all
# Create Release and Upload artifacts
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
target/x86_64-unknown-linux-musl/release/steward
LICENSE
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}