Create release #1
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
name: Create release | |
on: | |
push: | |
tags: | |
- '*' | |
pull_request: | |
tags: | |
- '*' | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go | |
uses: actions/checkout@v2 | |
- uses: actions/setup-go@v2 | |
with: | |
go-version: '1.20' | |
check-latest: true | |
- run: mkdir -p build/ | |
- name: Build for Windows amd64 | |
env: | |
GOPROXY: "https://proxy.golang.org" | |
GOARCH: "amd64" | |
GOOS: "windows" | |
run: go build -o build/patcher.win-amd64.exe | |
- name: Build for Mac amd64 | |
env: | |
GOPROXY: "https://proxy.golang.org" | |
GOARCH: "amd64" | |
GOOS: "darwin" | |
run: go build -o build/patcher.mac-amd64 | |
- name: Build for Mac arm64 | |
env: | |
GOPROXY: "https://proxy.golang.org" | |
GOARCH: "arm64" | |
GOOS: "darwin" | |
run: go build -o build/patcher.mac-arm64 | |
- name: Build for Linux amd64 | |
env: | |
GOPROXY: "https://proxy.golang.org" | |
GOARCH: "amd64" | |
GOOS: "linux" | |
run: go build -o build/patcher.linux-amd64 | |
- name: Build for Linux arm64 | |
env: | |
GOPROXY: "https://proxy.golang.org" | |
GOARCH: "arm64" | |
GOOS: "linux" | |
run: go build -o build/patcher.linux-arm64 | |
- name: Create release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: release-${{ github.ref_name }} | |
files: | | |
build/patcher.win-amd64.exe | |
build/patcher.mac-amd64 | |
build/patcher.mac-arm64 | |
build/patcher.linux-amd64 | |
build/patcher.linux-arm64 | |
LICENSE |