Fix GH-3 to darwin/adm64 #17
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# workflow name @version 17 | |
name: CrossBuild | |
# on events | |
#on: | |
# watch: | |
# types: | |
# - started | |
# This crossbuild from Kuechlin/gotris | |
on: | |
push: | |
# Sequence of patterns matched against refs/tags | |
tags: | |
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | |
# Allows running this workflow manually from the Actions tab | |
workflow_dispatch: | |
permissions: | |
contents: write | |
defaults: | |
run: | |
shell: bash | |
# jobs | |
jobs: | |
# Build | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 1 | |
matrix: | |
goosarch: | |
- 'linux/386' | |
# - 'linux/amd64' | |
- 'windows/386' | |
# - 'windows/amd64' | |
- 'linux/arm' | |
- 'darwin/amd64' | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22.1' | |
- name: Set environment variable | |
run: echo "MY_APPTAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV | |
- name: Get OS and arch info | |
run: | | |
GOOSARCH=${{matrix.goosarch}} | |
GOOS=${GOOSARCH%/*} | |
GOARCH=${GOOSARCH#*/} | |
APPVERSION=$MY_APPTAG | |
BINARY_NAME=${{github.repository}}-$GOOS-$GOARCH-$APPVERSION | |
echo "BINARY_NAME=$BINARY_NAME" >> $GITHUB_ENV | |
echo "GOOS=$GOOS" >> $GITHUB_ENV | |
echo "GOARCH=$GOARCH" >> $GITHUB_ENV | |
- name: Build | |
run: | | |
go build -v -o "$BINARY_NAME" cmd/wiper/*go | |
- name: Release Notes | |
run: | |
git log $(git describe HEAD~ --tags --abbrev=0)..HEAD --pretty='format:* %h %s%n * %an <%ae>' --no-merges >> ".github/RELEASE-TEMPLATE.md" | |
- name: Release with Notes | |
uses: softprops/action-gh-release@v2 | |
with: | |
body_path: ".github/RELEASE-TEMPLATE.md" | |
draft: true | |
files: ${{env.BINARY_NAME}} | |