Skip to content

fix(gitconfigs): resolve UU merge conflicts pack-wins (#24) #17

fix(gitconfigs): resolve UU merge conflicts pack-wins (#24)

fix(gitconfigs): resolve UU merge conflicts pack-wins (#24) #17

Workflow file for this run

name: Release
on:
push:
tags: ["*"]
permissions:
contents: write
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- run: go vet ./...
- run: go test ./...
release:
needs: test
runs-on: ubuntu-latest
strategy:
matrix:
include:
- goos: linux
goarch: amd64
- goos: linux
goarch: arm64
- goos: darwin
goarch: amd64
- goos: darwin
goarch: arm64
- goos: windows
goarch: amd64
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
run: |
ext=""
if [ "$GOOS" = "windows" ]; then ext=".exe"; fi
go build -ldflags="-s -w -X github.com/caedis/gtnh-daily-updater/cmd.version=${GITHUB_REF_NAME}" -o "gtnh-daily-updater${ext}" .
- name: Package
run: |
ext=""
if [ "${{ matrix.goos }}" = "windows" ]; then ext=".exe"; fi
version="${GITHUB_REF_NAME}"
zip "gtnh-daily-updater-${version}-${{ matrix.goos }}-${{ matrix.goarch }}.zip" "gtnh-daily-updater${ext}"
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: gtnh-daily-updater-${{ matrix.goos }}-${{ matrix.goarch }}
path: "*.zip"
publish:
needs: release
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
merge-multiple: true
- name: Create release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: gtnh-daily-updater-*