mirror of
https://github.com/gomods/athens
synced 2026-02-03 11:00:32 +00:00
github actions + goreleaser to build and publish binaries (#1623)
* initial github action to build github hosted binary artifact releases * consistent with Makefile * fix syntax error * add GOPROXY env var * reintroduce VERSION to env and go build.version * barf, typo * set build.version to the tag Co-authored-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
---
|
||||
name: publish github release artifacts with goreleaser
|
||||
on:
|
||||
push:
|
||||
tags: '*'
|
||||
jobs:
|
||||
goreleaser:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: unshallow
|
||||
run: git fetch --prune --unshallow
|
||||
- name: setup-go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.14
|
||||
- name: capture current date
|
||||
id: date
|
||||
run: echo "::set-output name=date::$(date -u '+%Y-%m-%d-%H:%M:%S-%Z')"
|
||||
- name: goreleaser
|
||||
uses: goreleaser/goreleaser-action@v2
|
||||
with:
|
||||
version: latest
|
||||
args: release --rm-dist
|
||||
env:
|
||||
DATE: ${{ steps.date.outputs.date }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
Reference in New Issue
Block a user