Merge pull request #43 from karimra/fix-state #22
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.19.5 | |
GORELEASER_VER: v1.19.2 | |
jobs: | |
test: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ env.GOVER }} | |
- run: go test -cover ./... | |
env: | |
CGO_ENABLED: 0 | |
release: | |
runs-on: ubuntu-20.04 | |
needs: | |
- test | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ env.GOVER }} | |
- name: Configure git for private modules | |
env: | |
TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | |
run: git config --global url."https://karimra:${TOKEN}@github.com".insteadOf "https://github.com" | |
- name: Release with goreleaser | |
uses: goreleaser/goreleaser-action@v4 | |
with: | |
version: ${{ env.GORELEASER_VER }} | |
args: release --rm-dist -f .goreleaser.yml | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |