miller/.github/workflows/release.yml
Jauder Ho 3b4171e242
Update release.yml (#867)
* Update release.yml

This properly caches the build so that rebuilds run much faster.

Also update to Go 1.17.6

* Update release.yml

Fix formatting
2022-01-18 21:56:53 -05:00

49 lines
1.1 KiB
YAML

name: Release
on:
push:
tags:
- v*
workflow_dispatch:
env:
GO_VERSION: 1.17.6
jobs:
release:
name: Release
strategy:
matrix:
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Set up Go
uses: actions/setup-go@v2.1.5
with:
go-version: ${{ env.GO_VERSION }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2.4.0
with:
fetch-depth: 0
# https://github.com/marketplace/actions/cache
- name: Cache Go modules
uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
# https://goreleaser.com/ci/actions/
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
#if: startsWith(github.ref, 'refs/tags/v')
with:
version: latest
args: release -f .goreleaser.yml --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}