Skip to content

fix: Remove 'develop' branch from Docker workflow triggers and clean … #1

fix: Remove 'develop' branch from Docker workflow triggers and clean …

fix: Remove 'develop' branch from Docker workflow triggers and clean … #1

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
build:
name: Build and Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.25.5'
cache: true
- name: Get version from tag
id: get_version
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- name: Build binaries
run: |
# Linux amd64
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build \
-ldflags "-X main.Version=${{ steps.get_version.outputs.VERSION }} -X main.BuildTime=$(date -u '+%Y-%m-%d_%H:%M:%S')" \
-o dist/executor-worker-linux-amd64 \
./cmd/executor-worker
# Linux arm64
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build \
-ldflags "-X main.Version=${{ steps.get_version.outputs.VERSION }} -X main.BuildTime=$(date -u '+%Y-%m-%d_%H:%M:%S')" \
-o dist/executor-worker-linux-arm64 \
./cmd/executor-worker
# Darwin amd64
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build \
-ldflags "-X main.Version=${{ steps.get_version.outputs.VERSION }} -X main.BuildTime=$(date -u '+%Y-%m-%d_%H:%M:%S')" \
-o dist/executor-worker-darwin-amd64 \
./cmd/executor-worker
# Darwin arm64
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build \
-ldflags "-X main.Version=${{ steps.get_version.outputs.VERSION }} -X main.BuildTime=$(date -u '+%Y-%m-%d_%H:%M:%S')" \
-o dist/executor-worker-darwin-arm64 \
./cmd/executor-worker
# Windows amd64
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build \
-ldflags "-X main.Version=${{ steps.get_version.outputs.VERSION }} -X main.BuildTime=$(date -u '+%Y-%m-%d_%H:%M:%S')" \
-o dist/executor-worker-windows-amd64.exe \
./cmd/executor-worker
- name: Create checksums
run: |
cd dist
sha256sum * > checksums.txt
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: |
dist/executor-worker-*
dist/checksums.txt
generate_release_notes: true
draft: false
prerelease: ${{ contains(steps.get_version.outputs.VERSION, '-') }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}