Skip to content

Add GitHub Actions upload to Releases #6

Add GitHub Actions upload to Releases

Add GitHub Actions upload to Releases #6

Workflow file for this run

name: ortlinde Go build
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version-file: go.mod
- name: Install system build dependencies
run: sudo apt-get install -y binutils-mingw-w64-x86-64 gcc-mingw-w64-x86-64
- name: Generate Windows resource COFF
run: ./buildresource.sh
- name: Install Go dependencies
run: go get .
- name: Build for Windows x64
env:
GOOS: windows
GOARCH: amd64
run: go build -v -o ortlinde.exe -ldflags="-X main.VERSION=$(date '+%Y-%m-%d').${GITHUB_SHA::7}"
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ortlinde.exe
path: ortlinde.exe
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: >-
gh release create ${{ github.ref_name }}
"ortlinde.exe"
--generate-notes
--title "$(date '+%Y-%m-%d').${GITHUB_SHA::7}"