Release #6
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: | |
| jobs: | |
| release: | |
| # This workflow should always be run on main - this is enforced by the | |
| # `release` environment directly but added here for visibility. | |
| # If the workflow fails during publishing, a new release must be published | |
| if: github.ref == 'refs/heads/main' && github.run_attempt == '1' | |
| runs-on: ubuntu-latest | |
| environment: release | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3.0.0 | |
| id: app-token | |
| with: | |
| app-id: ${{ vars.CLI_APP_ID }} | |
| private-key: ${{ secrets.CLI_APP_PRIVATE_KEY }} | |
| permission-contents: write | |
| owner: planetscale | |
| repositories: | | |
| cli | |
| homebrew-tap | |
| scoop-bucket | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ steps.app-token.outputs.token }} | |
| persist-credentials: true | |
| - name: Configure Git | |
| run: | | |
| git config user.name "planetscale-cli[bot]" | |
| git config user.email "272331943+planetscale-cli[bot]@users.noreply.github.com" | |
| - name: Bump version and push tag | |
| id: bump | |
| run: script/bump-version.sh | |
| - name: Publish artifacts | |
| env: | |
| GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} | |
| GORELEASER_CURRENT_TAG: ${{ steps.bump.outputs.RELEASE_VERSION }} | |
| DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
| DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
| AUR_KEY: ${{ secrets.AUR_KEY }} | |
| run: script/release.sh |