-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (34 loc) · 1.17 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: '🧑🏭'
on: [ push, pull_request ]
jobs:
build:
runs-on: ubuntu-latest
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' ./...
- name: Build windows/amd64
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') == true
run: GOOS=windows GOARCH=amd64 go build -o ChunkCleaner-Win64.exe
- name: Build linux/amd64
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') == true
run: GOOS=linux GOARCH=amd64 go build -o ChunkCleaner-Linux64
- name: Release
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') == true
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
LICENSE
ChunkCleaner-Win64.exe
ChunkCleaner-Linux64