Skip to content

Build and Release

Build and Release #3

Workflow file for this run

name: Build and Release
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, windows]
goarch: [amd64, arm64]
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.23.x"
- name: Install dependencies
run: go get .
- name: Build
run: |
mkdir -p bin
EXT=""
if [ "${{ matrix.goos }}" == "windows" ]; then EXT=".exe"; fi
GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -v -o bin/task-tracker-${{ matrix.goos }}-${{ matrix.goarch }}${EXT}
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4
with:
name: task-tracker-${{ matrix.goos }}-${{ matrix.goarch }}
path: bin/task-tracker-${{ matrix.goos }}-${{ matrix.goarch }}*
release:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- name: Release
uses: softprops/action-gh-release@v2
with:
files: bin/*
draft: true
generate_release_notes: true