feat: fixed cross build #6
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
# This workflow will build a golang project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go | |
name: Go | |
on: | |
push: | |
tags: | |
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: "1.21" | |
- name: Build-darwin-386 | |
run: CGO_ENABLED=0 GOOS=darwin GOARCH=386 go build -v -o weworkbot-darwin-386 . | |
- name: Build-darwin-amd64 | |
run: CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -v -o weworkbot-darwin-amd64 . | |
- name: Build-darwin-arm | |
run: CGO_ENABLED=0 GOOS=darwin GOARCH=arm go build -v -o weworkbot-darwin-arm . | |
- name: Build-darwin-arm64 | |
run: CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -v -o weworkbot-darwin-arm64 . | |
- name: Build-dragonfly-amd64 | |
run: CGO_ENABLED=0 GOOS=dragonfly GOARCH=amd64 go build -v -o weworkbot-dragonfly-amd64 . | |
- name: Build-freebsd-386 | |
run: CGO_ENABLED=0 GOOS=freebsd GOARCH=386 go build -v -o weworkbot-freebsd-386 . | |
- name: Build-freebsd-amd64 | |
run: CGO_ENABLED=0 GOOS=freebsd GOARCH=amd64 go build -v -o weworkbot-freebsd-amd64 . | |
- name: Build-freebsd-arm | |
run: CGO_ENABLED=0 GOOS=freebsd GOARCH=arm go build -v -o weworkbot-freebsd-arm . | |
- name: Build-linux-386 | |
run: CGO_ENABLED=0 GOOS=linux GOARCH=386 go build -v -o weworkbot-linux-386 . | |
- name: Build-linux-amd64 | |
run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -o weworkbot-linux-amd64 . | |
- name: Build-linux-arm | |
run: CGO_ENABLED=0 GOOS=linux GOARCH=arm go build -v -o weworkbot-linux-arm . | |
- name: Build-linux-arm64 | |
run: CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -v -o weworkbot-linux-arm64 . | |
- name: Build-linux-ppc64 | |
run: CGO_ENABLED=0 GOOS=linux GOARCH=ppc64 go build -v -o weworkbot-linux-ppc64 . | |
- name: Build-linux-ppc64le | |
run: CGO_ENABLED=0 GOOS=linux GOARCH=ppc64le go build -v -o weworkbot-linux-ppc64le . | |
- name: Build-netbsd-386 | |
run: CGO_ENABLED=0 GOOS=netbsd GOARCH=386 go build -v -o weworkbot-netbsd-386 . | |
- name: Build-netbsd-amd64 | |
run: CGO_ENABLED=0 GOOS=netbsd GOARCH=amd64 go build -v -o weworkbot-netbsd-amd64 . | |
- name: Build-netbsd-arm | |
run: CGO_ENABLED=0 GOOS=netbsd GOARCH=arm go build -v -o weworkbot-netbsd-arm . | |
- name: Build-openbsd-386 | |
run: CGO_ENABLED=0 GOOS=openbsd GOARCH=386 go build -v -o weworkbot-openbsd-386 . | |
- name: Build-openbsd-amd64 | |
run: CGO_ENABLED=0 GOOS=openbsd GOARCH=amd64 go build -v -o weworkbot-openbsd-amd64 . | |
- name: Build-openbsd-arm | |
run: CGO_ENABLED=0 GOOS=openbsd GOARCH=arm go build -v -o weworkbot-openbsd-arm . | |
- name: Build-plan9-386 | |
run: CGO_ENABLED=0 GOOS=plan9 GOARCH=386 go build -v -o weworkbot-plan9-386 . | |
- name: Build-plan9-amd64 | |
run: CGO_ENABLED=0 GOOS=plan9 GOARCH=amd64 go build -v -o weworkbot-plan9-amd64 . | |
- name: Build-solaris-amd64 | |
run: CGO_ENABLED=0 GOOS=solaris GOARCH=amd64 go build -v -o weworkbot-solaris-amd64 . | |
- name: Build-windows-386 | |
run: CGO_ENABLED=0 GOOS=windows GOARCH=386 go build -v -o weworkbot-windows-386.exe . | |
- name: Build-windows-amd64 | |
run: CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -v -o weworkbot-windows-amd64.exe . | |
- name: Build-linux-loong64 | |
run: CGO_ENABLED=0 GOOS=linux GOARCH=loong64 go build -v -o weworkbot-linux-loong64 . | |
- name: Create Release and Upload Release Asset | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
tag_name: ${{ github.ref }} | |
name: Release ${{ github.ref }} | |
body: TODO New Release. | |
draft: false | |
prerelease: false | |
files: | | |
weworkbot-darwin-386 | |
weworkbot-darwin-amd64 | |
weworkbot-darwin-arm | |
weworkbot-darwin-arm64 | |
weworkbot-dragonfly-amd64 | |
weworkbot-freebsd-386 | |
weworkbot-freebsd-amd64 | |
weworkbot-freebsd-arm | |
weworkbot-linux-386 | |
weworkbot-linux-amd64 | |
weworkbot-linux-arm | |
weworkbot-linux-arm64 | |
weworkbot-linux-ppc64 | |
weworkbot-linux-ppc64le | |
weworkbot-linux-loong64 | |
weworkbot-netbsd-386 | |
weworkbot-netbsd-amd64 | |
weworkbot-netbsd-arm | |
weworkbot-openbsd-386 | |
weworkbot-openbsd-amd64 | |
weworkbot-openbsd-arm | |
weworkbot-plan9-386 | |
weworkbot-plan9-amd64 | |
weworkbot-solaris-amd64 | |
weworkbot-windows-386.exe | |
weworkbot-windows-amd64.exe | |
LICENSE |