add workflow

This commit is contained in:
kbwo 2024-05-19 21:36:31 +09:00
parent 4ba3683ab4
commit c12e9bc129

35
.github/workflows/release.yml vendored Normal file
View file

@ -0,0 +1,35 @@
name: Release
on:
push:
tags:
- 'v*.*.*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Build project
run: cargo build --release
- name: Archive the build artifacts
run: tar -czvf build.tar.gz -C target/release .
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref }}
files: build.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}