Fix an issue where if clone fails once it'll fail subsequently for em… #64
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 | |
| jobs: | |
| goreleaser: | |
| runs-on: macos-14 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.24.2" | |
| - name: Configure AWS Credentials | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| aws-region: us-west-1 | |
| # Mint short-lived token for the tap repo | |
| - id: app-token | |
| uses: tibdex/github-app-token@v2 | |
| with: | |
| app_id: ${{ secrets.APP_ID }} | |
| private_key: ${{ secrets.APP_PRIVATE_KEY }} | |
| # Optionally restrict to just the tap repo | |
| repositories: '["homebrew-tap"]' | |
| - name: GoReleaser | |
| uses: goreleaser/goreleaser-action@v6 | |
| with: | |
| distribution: goreleaser | |
| version: latest | |
| args: release --clean | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| HOMEBREW_TAP_GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} | |
| - name: Upload metadata to S3 | |
| run: | | |
| # Create version file (strip v prefix) | |
| echo "${GITHUB_REF#refs/tags/v}" > latest-version | |
| # Upload latest version pointer | |
| aws s3 cp latest-version s3://major-cli-releases/latest-version --acl public-read --content-type "text/plain" | |
| # Upload install script | |
| aws s3 cp install.sh s3://major-cli-releases/install.sh --acl public-read --content-type "text/plain" |