1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write # Add explicit permission to create releases
jobs:
build:
name: Build Release Binary
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for tags
- 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 }}