Skip to content

Commit

Permalink
Add release workflow to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
rukai committed Dec 24, 2021
1 parent 47ee1a6 commit 61c25ad
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/release.yml
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

0 comments on commit 61c25ad

Please sign in to comment.