2022-07-16 15:29:26 +00:00
|
|
|
name: Build and release
|
|
|
|
|
|
|
|
on:
|
|
|
|
release:
|
|
|
|
types: [created]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
build:
|
|
|
|
name: Build and release
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
goos: [windows]
|
2022-07-17 12:40:32 +00:00
|
|
|
goarch: ["amd64"]
|
2022-07-16 15:29:26 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
|
2022-07-16 21:22:18 +00:00
|
|
|
- name: Set up Go
|
|
|
|
uses: actions/setup-go@v2
|
|
|
|
with:
|
2022-08-12 12:03:08 +00:00
|
|
|
go-version: ^1.19
|
2022-07-16 15:29:26 +00:00
|
|
|
|
2022-07-16 21:22:18 +00:00
|
|
|
- name: Check out code into the Go module directory
|
|
|
|
uses: actions/checkout@v2
|
2022-07-31 18:59:16 +00:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
2022-07-16 21:22:18 +00:00
|
|
|
|
|
|
|
- name: Build stitch tool
|
|
|
|
run: go build -v -ldflags="-X 'main.versionString=${{ github.event.release.tag_name }}'" .
|
|
|
|
working-directory: ./bin/stitch
|
2022-07-16 21:28:45 +00:00
|
|
|
env:
|
|
|
|
GOARCH: ${{ matrix.goarch }}
|
|
|
|
GOOS: ${{ matrix.goos }}
|
2022-07-16 21:22:18 +00:00
|
|
|
|
|
|
|
- name: Create distribution archive
|
|
|
|
run: go run -v ./scripts/dist
|
|
|
|
|
|
|
|
- name: Upload binary to release
|
|
|
|
uses: svenstaro/upload-release-action@v2
|
|
|
|
with:
|
|
|
|
file: dist/dist.zip
|
|
|
|
asset_name: noita-mapcap-${{ matrix.goos }}-${{ matrix.goarch }}.zip
|
|
|
|
overwrite: true
|