Skip to content

Commit

Permalink
feat: add go releaser builds/releases
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianwebber committed Aug 28, 2020
1 parent d32059e commit 9d25d82
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 8 deletions.
29 changes: 21 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,29 @@
name: CI
name: goreleaser

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
tags:
- '*'

jobs:
build:
goreleaser:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: shogo82148/actions-goveralls@v1
-
name: Checkout
uses: actions/checkout@v2
with:
path-to-profile: profile.cov
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.14
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@

# Dependency directories (remove the comment below to include it)
# vendor/
dist/
57 changes: 57 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
builds:
- id: pgconfigctl
binary: pgconfigctl
main: cmd/pgconfigctl/main.go
env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
ignore:
- goos: darwin
goarch: 386
goarch:
- amd64

nfpms:
- id: default
package_name: pgconfigctl
file_name_template: "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"

builds:
- pgconfigctl

replacements:
amd64: 64-bit
386: 32-bit
darwin: macOS

homepage: https://pgconfig.org/
maintainer: Sebastian Webber <[email protected]>
description: CLI for the pgconfig.org website

license: MIT

formats:
- deb
- rpm

archives:
- id: pgconfigctl
builds:
- pgconfigctl
name_template: "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
format: binary
checksum:
name_template: "checksums.txt"
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
File renamed without changes.

0 comments on commit 9d25d82

Please sign in to comment.