Skip to content

Replace GoReleaser deprecated archives.replacements with name templates #18

Replace GoReleaser deprecated archives.replacements with name templates

Replace GoReleaser deprecated archives.replacements with name templates #18

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*.*.*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
if: startsWith(github.ref, 'refs/tags/')
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_RELEASER: ${{ secrets.GH_RELEASER }}
docker-hub:
needs: release
name: Deploy to docker-hub
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Login to docker hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build and push to docker registry
if: success()
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ env.GITHUB_REPOSITORY }}:latest,${{ env.GITHUB_REPOSITORY }}:${IMAGE_TAG}