Skip to content

fix: set version

fix: set version #17

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
env:
GO_VERSION: "1.21"
permissions:
contents: write
jobs:
build-package:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Set up Go 1.x.y
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- name: Checkout codebase
uses: actions/checkout@v3
- name: Build Package
run: |
make build RELEASE=${{ github.ref_name }}
goreleaser:
runs-on: ubuntu-latest
needs: build-package
steps:
- name: Get version
id: get_version
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: goreleaser/goreleaser-action@v6
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}