Skip to content

Commit

Permalink
Add goreleaser (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
sj14 authored May 3, 2021
1 parent 2240d2f commit d2ada2e
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 1 deletion.
22 changes: 22 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Release
on:
push:
tags:
- "*"
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
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GORELEASER }}
75 changes: 75 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
project_name: astral

before:
hooks:
- go mod download
builds:
- main: ./cmd/astral/main.go
id: "astral"
env:
- CGO_ENABLED=0
- GO111MODULE=on
goos:
- linux
- darwin
- freebsd
- openbsd
- netbsd
- solaris
- dragonfly
- windows
goarch:
- 386
- amd64
- arm
- arm64
goarm:
- 6
- 7
archives:
- id: astral
builds:
- astral
wrap_in_directory: true
format_overrides:
- goos: windows
format: zip
files:
- LICENSE
- AUTHORS
- README.md
checksum:
name_template: "checksums.txt"
snapshot:
name_template: "{{ .Tag }}-next-{{.Commit}}"
nfpms:
- maintainer: Simon Jürgensmeyyer <[email protected]>
homepage: https://github.com/sj14/astral/
description: Calculations for the position of the sun and moon.
license: Apache License 2.0
formats:
- deb
- rpm
builds:
- astral
brews:
- name: astral
ids:
- astral
tap:
owner: sj14
name: homebrew-tap
description: Calculations for the position of the sun and moon.
release:
github:
owner: sj14
name: astral
disable: false
draft: false
prerelease: false
changelog:
filters:
exclude:
- typo
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.16

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/logrusorgru/aurora/v3 v3.0.0 // indirect
github.com/logrusorgru/aurora/v3 v3.0.0
github.com/stretchr/testify v1.7.0
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
)

0 comments on commit d2ada2e

Please sign in to comment.