Skip to content

fix: ci using goreleaser and github #4

fix: ci using goreleaser and github

fix: ci using goreleaser and github #4

Workflow file for this run

name: release
on:
push:
tags:
- "v*.*.*"
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: 1.21
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Test
run: make test
- name: Get release tag
id: get_version
uses: battila7/get-version-action@v2
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GO_RELEASER_TOKEN }}