Skip to content

Commit

Permalink
🚀 Added go-releaser
Browse files Browse the repository at this point in the history
  • Loading branch information
F0rzend committed Jun 10, 2022
1 parent 6445251 commit 9631944
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: goreleaser

on:
push:
tags:
- 'v*'

permissions:
contents: write

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.18

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
.idea/
dumper.yml

records/*
!records/.gitkeep
dist/
37 changes: 37 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
before:
hooks:
- go mod tidy
- go test -v ./...

gomod:
proxy: true

universal_binaries:
- replace: false

builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin

archives:
- replacements:
darwin: MacOS
linux: Linux
windows: Windows
amd64: 64-bit
386: 32-bit
all: Universal

wrap_in_directory: true

format_overrides:
- goos: windows
format: zip

release:
mode: keep-existing
draft: true

0 comments on commit 9631944

Please sign in to comment.