2020-03-11 00:54:39 +00:00
|
|
|
name: Release
|
2020-03-11 00:36:41 +00:00
|
|
|
on: [release]
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
release:
|
|
|
|
runs-on: ubuntu-latest
|
2020-03-11 00:52:29 +00:00
|
|
|
# if: startsWith(github.ref, 'refs/tags/')
|
2020-03-11 00:36:41 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Unshallow
|
|
|
|
run: git fetch --prune --unshallow
|
|
|
|
|
|
|
|
- name: Set up Go
|
2020-11-02 12:19:37 +00:00
|
|
|
uses: actions/setup-go@v2.1.3
|
2020-03-11 00:36:41 +00:00
|
|
|
with:
|
|
|
|
go-version: 1.14
|
|
|
|
id: go
|
|
|
|
|
2020-04-09 13:56:04 +00:00
|
|
|
- name: Login to docker hub
|
|
|
|
run: docker login -u $DOCKER_USER -p $DOCKER_PASS
|
|
|
|
|
2020-03-11 00:36:41 +00:00
|
|
|
- name: Run GoReleaser
|
2020-11-02 12:24:31 +00:00
|
|
|
uses: goreleaser/goreleaser-action@v2.2.1
|
2020-03-11 00:36:41 +00:00
|
|
|
with:
|
|
|
|
version: latest
|
|
|
|
args: release --rm-dist
|
|
|
|
key: ${{ secrets.YOUR_PRIVATE_KEY }}
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|