Release #30
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
| # This workflow will build a golang project and create releases | |
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go | |
| name: Release | |
| on: | |
| workflow_run: | |
| workflows: ["Build"] | |
| types: | |
| - completed | |
| jobs: | |
| debug: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Debug workflow_run event | |
| run: | | |
| echo "Event: ${{ github.event.workflow_run.event }}" | |
| echo "Conclusion: ${{ github.event.workflow_run.conclusion }}" | |
| echo "Head branch: ${{ github.event.workflow_run.head_branch }}" | |
| echo "Head SHA: ${{ github.event.workflow_run.head_sha }}" | |
| echo "Triggering actor: ${{ github.event.workflow_run.triggering_actor.login }}" | |
| echo "Workflow name: ${{ github.event.workflow_run.name }}" | |
| echo "Display title: ${{ github.event.workflow_run.display_title }}" | |
| release: | |
| if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'push' && startsWith(github.event.workflow_run.head_branch, 'v') }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: '1.23' | |
| - name: Run GoReleaser | |
| uses: goreleaser/goreleaser-action@v5 | |
| with: | |
| distribution: goreleaser | |
| version: latest | |
| args: release --clean | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.CTRESTCLIENTSRC_RELEASE_TOKEN }} |