refactor: uncomment and restore Scoop publishing configuration in GoR… #10
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 | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| contents: write | |
| packages: write | |
| env: | |
| GO_VERSION: '1.22' | |
| jobs: | |
| release: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| - name: Cache Go modules | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cache/go-build | |
| ~/go/pkg/mod | |
| key: ${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go-${{ env.GO_VERSION }}- | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Run GoReleaser | |
| uses: goreleaser/goreleaser-action@v5 | |
| with: | |
| distribution: goreleaser | |
| version: latest | |
| args: release --clean | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GITHUB_REPOSITORY_OWNER: ${{ github.repository_owner }} | |
| HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }} | |
| SCOOP_BUCKET_GITHUB_TOKEN: ${{ secrets.SCOOP_BUCKET_GITHUB_TOKEN }} | |
| # update-homebrew: | |
| # name: Update Homebrew Formula | |
| # runs-on: ubuntu-latest | |
| # needs: [release] | |
| # if: startsWith(github.ref, 'refs/tags/v') | |
| # | |
| # steps: | |
| # - name: Update Homebrew formula | |
| # uses: mislav/bump-homebrew-formula-action@v3 | |
| # with: | |
| # formula-name: gh-notif | |
| # formula-path: Formula/gh-notif.rb | |
| # homebrew-tap: ${{ github.repository_owner }}/homebrew-tap | |
| # base-branch: main | |
| # download-url: https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/gh-notif_${{ github.ref_name }}_darwin_amd64.tar.gz | |
| # commit-message: | | |
| # {{formulaName}} {{version}} | |
| # | |
| # Created by https://github.com/mislav/bump-homebrew-formula-action | |
| # env: | |
| # COMMITTER_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }} | |
| # Scoop publishing is now handled by GoReleaser directly | |
| notify: | |
| name: Notify | |
| runs-on: ubuntu-latest | |
| needs: [release] | |
| if: always() | |
| steps: | |
| - name: Notify on success | |
| if: needs.release.result == 'success' | |
| run: | | |
| echo "Release ${{ github.ref_name }} completed successfully!" | |
| - name: Notify on failure | |
| if: needs.release.result == 'failure' | |
| run: | | |
| echo "Release ${{ github.ref_name }} failed!" | |
| exit 1 |