Go logger #7
Workflow file for this run
This file contains hidden or 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 Workflow | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
permissions: | |
contents: write | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.23' | |
- name: Install GoReleaser | |
run: go install github.com/goreleaser/goreleaser@latest | |
- name: Check version | |
run: | | |
VERSION=$(cat VERSION.txt) | |
echo "version=$VERSION" >> $GITHUB_ENV | |
echo "Version: $VERSION" | |
- name: Run GoReleaser | |
run: | | |
export GORELEASER_CURRENT_TAG="v${{ env.version }}" | |
export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} | |
goreleaser release --clean --rm-dist | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |