Merge pull request #4 from zeroBzeroT/bump-go-toolchain #25
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: '🧑🏭' | |
on: [ push, pull_request ] | |
jobs: | |
check: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: 'go.mod' | |
check-latest: true | |
cache: true | |
- name: Run linter and tests | |
run: go test -v -vet='all' ./... | |
release: | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') == true | |
needs: check | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: 'go.mod' | |
check-latest: true | |
cache: true | |
- name: Build windows/amd64 | |
run: GOOS=windows GOARCH=amd64 go build -o ChunkCleaner-Win64.exe | |
- name: Build linux/amd64 | |
run: GOOS=linux GOARCH=amd64 go build -o ChunkCleaner-Linux64 | |
- name: Release | |
uses: marvinpinto/action-automatic-releases@latest | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
prerelease: false | |
files: | | |
LICENSE | |
ChunkCleaner-Win64.exe | |
ChunkCleaner-Linux64 |