erigon-pulse/.github/workflows/release.yml
Tim Myers e2301387eb
chore: goreleaser workflow fix (#5298)
Use the automatically provided GITHUB_TOKEN secret.

Currently only has the default permissions which should let
it read the tag as needed.

Commented permissions would allow it to also automatically write
a github release, but will see if it works without that for now
for minimimum change.
2022-09-07 11:44:21 +07:00

47 lines
1.0 KiB
YAML

name: Release
# Uncomment the following to let goreleaser automatically
# create a GitHub release when a tag is pushed.
# permissions:
# contents: write
on:
push:
branches-ignore:
- '**'
tags:
- 'v*.*.*'
# to be used by fork patch-releases ^^
- 'v*.*.*-*'
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@master
with:
go-version: 1.18.x
- name: Prepare
id: prepare
run: |
TAG=${GITHUB_REF#refs/tags/}
echo ::set-output name=tag_name::${TAG}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Run GoReleaser
run: |
make release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ steps.prepare.outputs.tag_name }}
DOCKER_USERNAME: ${{ secrets.DOCKERHUB }}
DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_KEY }}