Skip to content

Commit 60df80e

Browse files
committed
Update Github release action
1 parent 6a09124 commit 60df80e

File tree

1 file changed

+0
-51
lines changed

1 file changed

+0
-51
lines changed

.github/workflows/release.yml

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,9 @@
11
name: Build and Release
22

33
on:
4-
# push:
5-
# branches: [main]
6-
# paths:
7-
# - "**.go" # Only run on changes to Go files
8-
# - "go.mod" # Or changes to dependencies
9-
# - "go.sum"
10-
# # Excludes changes to docs, workflows, etc.
11-
# tags-ignore:
12-
# - "v*" # Avoid running this workflow when tagging (prevents circular triggers)
13-
workflow_dispatch: # Manual trigger
144

155
jobs:
166
build:
177
runs-on: ubuntu-latest
188
steps:
199
- uses: actions/checkout@v3
20-
21-
- name: Set up Go
22-
uses: actions/setup-go@v4
23-
with:
24-
go-version: "1.23"
25-
26-
- name: Build
27-
run: |
28-
cd go-tui
29-
mkdir -p build
30-
# -ldflags="-s -w" removes debug information and symbol tables
31-
# -trimpath removes file system paths from the binary
32-
GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -trimpath -o build/anitrack-cli-windows-amd64.exe
33-
GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -trimpath -o build/anitrack-cli-linux-amd64
34-
GOOS=darwin GOARCH=arm64 go build -ldflags="-s -w" -trimpath -o build/anitrack-cli-macos-arm64
35-
36-
- name: Install UPX
37-
run: |
38-
sudo apt-get update
39-
sudo apt-get install -y upx
40-
41-
- name: Compress binaries
42-
run: |
43-
upx --best --lzma build/anitrack-cli-windows-amd64.exe
44-
upx --best --lzma build/anitrack-cli-linux-amd64
45-
# Skip macOS binaries as UPX can cause issues with code signing
46-
47-
- name: Create Release
48-
id: create_release
49-
uses: softprops/action-gh-release@v1
50-
with:
51-
files: |
52-
build/anitrack-cli-windows-amd64.exe
53-
build/anitrack-cli-linux-amd64
54-
build/anitrack-cli-macos-arm64
55-
tag_name: v0.1.${{ github.run_number }}
56-
name: Release v0.1.${{ github.run_number }}
57-
draft: false
58-
prerelease: false
59-
env:
60-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)