Skip to content

Commit

Permalink
feat: gorelease
Browse files Browse the repository at this point in the history
  • Loading branch information
mdshack committed Sep 23, 2023
1 parent bb10a8c commit dc816ba
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 54 deletions.
46 changes: 0 additions & 46 deletions .github/workflows/ci.yml

This file was deleted.

13 changes: 5 additions & 8 deletions .github/workflows/release-please.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,10 @@ jobs:
uses: actions/checkout@v3
with:
ref: '${{ steps.release.outputs.tag_name }}'
- uses: actions/setup-go@v4
- uses: goreleaser/goreleaser-action@v2
if: ${{ steps.release.outputs.release_created }}
- name: Build binary
if: ${{ steps.release.outputs.release_created }}
run: go build -mod vendor -o dbanon
- name: Release
if: ${{ steps.release.outputs.release_created }}
run: gh release upload ${{ steps.release.outputs.tag_name }} dbanon
with:
version: latest
args: release --rm-dist
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28 changes: 28 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
before:
hooks:
# You may remove this if you don't use go modules.
- go mod download
# you may remove this if you don't need go generate
- go generate ./...
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
ignore:
- goos: linux
goarch: 386
archives:
- name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}"
format: zip
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
filters:
exclude:
- '^docs:'
- '^test:'

0 comments on commit dc816ba

Please sign in to comment.