Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 32 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,51 @@
name: Release
name: '🧑‍🏭'

on:
push:
tags:
- "*"
on: [ push, pull_request ]

jobs:
build:
runs-on: ubuntu-latest

check:
runs-on: ubuntu-22.04
steps:

- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Go
uses: actions/setup-go@v4
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:
go-version: 1.20.x
fetch-depth: 0

- name: Install dependencies
run: go get .
- 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 -v ./...

- name: Debug - List files
run: |
ls ${{ github.workspace }}
run: GOOS=linux GOARCH=amd64 go build -o ChunkCleaner-Linux64

- name: Release
uses: marvinpinto/action-automatic-releases@latest
Expand Down
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# If you prefer the allow list template instead of the deny list, see community template:
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
#
/ChunkCleaner-Linux64
/ChunkCleaner-Win64.exe

# Binaries for programs and plugins
*.exe
*.exe~
Expand All @@ -22,4 +22,4 @@ go.work

# User-specific stuff
.idea/
*.iml
*.iml