mirror of
https://github.com/andreicscs/HoneyWire
synced 2026-06-26 12:39:53 +00:00
54 lines
1.3 KiB
YAML
54 lines
1.3 KiB
YAML
name: Publish Wizard
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'wizard/v*.*.*'
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
packages: write
|
|
|
|
jobs:
|
|
publish:
|
|
name: Build and Publish Wizard Binaries
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.25'
|
|
|
|
- name: Extract Version
|
|
id: vars
|
|
run: |
|
|
TAG_REF="${GITHUB_REF#refs/tags/}"
|
|
VERSION=$(echo "$TAG_REF" | grep -oP 'v\K[0-9]+\.[0-9]+\.[0-9]+')
|
|
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
|
|
|
|
- name: Build Binaries
|
|
run: |
|
|
mkdir -p build
|
|
cd wizard
|
|
GOOS=linux GOARCH=amd64 go build -o ../build/honeywire-linux-amd64 cmd/wizard/main.go
|
|
GOOS=linux GOARCH=arm64 go build -o ../build/honeywire-linux-arm64 cmd/wizard/main.go
|
|
|
|
- name: Generate Checksums
|
|
run: |
|
|
cd build
|
|
sha256sum honeywire-* > checksums.txt
|
|
|
|
- name: Create GitHub Release
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
name: "Wizard v${{ steps.vars.outputs.VERSION }}"
|
|
files: |
|
|
build/honeywire-linux-amd64
|
|
build/honeywire-linux-arm64
|
|
build/checksums.txt
|
|
generate_release_notes: true
|