-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
name: "tagged-release" | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
jobs: | ||
publish-binary: | ||
name: "Publish Binary to GitHub" | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
# `toolchain: stable` results in the latest stable toolchain being installed. | ||
# However as soon as we use cargo the real version specified in rust-toolchain.toml replaces the stable toolchain. | ||
# | ||
# When something like https://github.com/actions-rs/toolchain/pull/184 lands we can delete this line and get a nice speedup | ||
profile: minimal | ||
toolchain: stable | ||
- name: Build & test | ||
run: | | ||
cargo test --release | ||
cargo build --release | ||
mkdir rukaidata | ||
cp target/release/rukaidata_bot rukaidata | ||
cp target/release/rukaidata_website rukaidata | ||
tar -cvzf rukaidata.tar.gz rukaidata | ||
- name: Publish | ||
uses: marvinpinto/action-automatic-releases@latest | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
prerelease: false | ||
files: | | ||
*.tar.gz |