name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
build:
name: Build Release Binary
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Build Release Binary
uses: actions-rs/cargo@v1
with:
command: build
args: --release
- name: Create Release Archive
run: |
cd target/release
tar czf ../../gzinspector-linux-x86_64.tar.gz gzinspector
cd ../..
ls -l gzinspector-linux-x86_64.tar.gz # Verify archive exists
- name: Create Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: gzinspector-linux-x86_64.tar.gz
generate_release_notes: true
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}