Skip to content

Commit

Permalink
ci: add
Browse files Browse the repository at this point in the history
  • Loading branch information
jpts committed Apr 2, 2023
1 parent 18ac44a commit addf36d
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: goreleaser

on:
push:
tags:
- '*'

permissions:
contents: write
# packages: write
# issues: write

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Fetch all tags
run: git fetch --force --tags

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
version: latest
args: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30 changes: 30 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
project_name: coredns-enum
before:
hooks:
- go mod tidy
builds:
- id: coredns-enum
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm
- arm64
goarm:
- 6
archives:
- builds:
- coredns-enum
name_template: "{{ .ProjectName }}_{{ .Tag }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
wrap_in_directory: false
checksum:
name_template: 'checksums.txt'
algorithm: sha256
snapshot:
name_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc

0 comments on commit addf36d

Please sign in to comment.