Release by @github-merge-queue[bot] 477c9f33288aef349262a8d697ba2a37698e9f80 #102
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 | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| releaseType: | |
| description: Create a draft release | |
| required: true | |
| type: boolean | |
| default: false | |
| push: | |
| branches: | |
| - main | |
| concurrency: | |
| group: release | |
| cancel-in-progress: true | |
| run-name: Release by @${{ github.actor }} ${{ github.sha }} | |
| permissions: | |
| contents: write | |
| packages: write | |
| id-token: write | |
| pull-requests: read | |
| jobs: | |
| get-version: | |
| name: Version | |
| runs-on: ubuntu-latest | |
| outputs: | |
| version: ${{ steps.get-version.outputs.version }} | |
| steps: | |
| - name: Get Release Version | |
| id: get-version | |
| uses: nullify-platform/github-actions/actions/release-version@main | |
| - run: | | |
| echo "**Version:** ${{ steps.get-version.outputs.version }}" >> $GITHUB_STEP_SUMMARY | |
| echo "**Short SHA:** $(git rev-parse --short HEAD)" >> $GITHUB_STEP_SUMMARY | |
| build: | |
| if: ${{ needs.get-version.outputs.version != 'undefined' || (github.event_name == 'workflow_dispatch' && needs.get-version.outputs.version != 'undefined') }} | |
| name: Build | |
| needs: [ get-version ] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| - name: Set Release Variables | |
| run: echo "VERSION=${{ needs.get-version.outputs.version }}" >> $GITHUB_ENV | |
| - name: Build CLI | |
| run: make package | |
| - name: Upload Binaries | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: binaries | |
| retention-days: 2 | |
| path: bin/* | |
| release: | |
| if: ${{ needs.get-version.outputs.version != 'undefined' || (github.event_name == 'workflow_dispatch' && needs.get-version.outputs.version != 'undefined') }} | |
| name: Release | |
| runs-on: ubuntu-latest | |
| needs: [ get-version, build ] | |
| steps: | |
| - name: Download Binaries | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: ${{ github.workspace }} | |
| - name: Generate Release | |
| uses: softprops/action-gh-release@v2 | |
| env: | |
| VERSION: ${{ needs.get-version.outputs.version }} | |
| with: | |
| draft: false | |
| generate_release_notes: true | |
| append_body: true | |
| tag_name: v${{ env.VERSION }} | |
| token: ${{ github.token }} | |
| files: | | |
| ${{ github.workspace }}/binaries/* |