Skip to content

Commit

Permalink
Merge pull request #5 from Yisaer/add_release_action
Browse files Browse the repository at this point in the history
action: add release action
  • Loading branch information
Yisaer authored Aug 20, 2024
2 parents ef77393 + b25b879 commit 586f32d
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Release

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true

- name: Build binary
run: cargo build --release

- name: Archive binary
run: |
mkdir -p release
cp target/release/rstream release/rstream
tar -czvf release.tar.gz release
env:
CARGO_TERM_COLOR: always

- name: Upload release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./release.tar.gz
asset_name: release.tar.gz
asset_content_type: application/gzip

0 comments on commit 586f32d

Please sign in to comment.