Merge pull request #106 from ankurag2/main #28
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: release | |
on: | |
push: | |
tags: | |
- v* | |
env: | |
GOVER: 1.21.1 | |
GORELEASER_VER: v0.180.3 | |
jobs: | |
test: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ env.GOVER }} | |
- run: go test -cover ./... | |
env: | |
CGO_ENABLED: 0 | |
release: | |
runs-on: ubuntu-22.04 | |
needs: | |
- test | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ env.GOVER }} | |
- name: Login to github container registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Release with goreleaser | |
uses: goreleaser/goreleaser-action@v5 | |
with: | |
version: ${{ env.GORELEASER_VER }} | |
args: release --rm-dist | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |