Skip to content

.github/workflows/release.yml #4

.github/workflows/release.yml

.github/workflows/release.yml #4

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22'
- name: Build
run: |
VERSION=$(git describe --tags | tr -d 'v')
mkdir -p builds
# Binary builds
GOOS=linux GOARCH=amd64 go build -o builds/lilmail${VERSION}_linux_amd64
GOOS=windows GOARCH=amd64 go build -o builds/lilmail${VERSION}_windows_amd64.exe
GOOS=darwin GOARCH=amd64 go build -o builds/lilmail${VERSION}_darwin_amd64
# Source archive
git archive --format=zip HEAD -o builds/lilmail${VERSION}_source.zip
- uses: softprops/action-gh-release@v1
with:
files: builds/*