Release: new CLI preview version using JReleaser #504
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: new CLI preview version using JReleaser' | |
| on: | |
| workflow_run: | |
| workflows: ["Test: CI build"] | |
| types: | |
| - completed | |
| permissions: | |
| id-token: write | |
| contents: write | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'main' }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - id: 'auth' | |
| name: 'Authenticate to Google Cloud' | |
| uses: 'google-github-actions/auth@v2' | |
| with: | |
| workload_identity_provider: ${{ secrets.GCP_STREAMX_RELEASES_WORKLOAD_IDENTITY_PROVIDER }} | |
| service_account: ${{ secrets.GCP_STREAMX_RELEASES_READ_SA }} | |
| - name: Configure Git | |
| run: | | |
| git config --global user.email "github.actions@streamx.dev" | |
| git config --global user.name "${GITHUB_ACTOR}" | |
| mkdir -p ~/.ssh | |
| printf '%s\n' "${{ secrets.SSH_SECRET_KEY }}" > ~/.ssh/id_rsa | |
| chmod 0600 ~/.ssh/id_rsa | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: '17' | |
| distribution: 'adopt' | |
| - name: Preview release prepare | |
| run: ./mvnw -B clean install -DskipTests -P preview | |
| - name: Preview release perform | |
| env: | |
| JRELEASER_GITHUB_TOKEN: ${{ secrets.JRELEASER_PREVIEW_GITHUB_TOKEN }} | |
| JRELEASER_HOMEBREW_GITHUB_TOKEN: ${{ secrets.JRELEASER_HOMEBREW_PREVIEW_GITHUB_TOKEN }} | |
| JRELEASER_SCOOP_GITHUB_TOKEN: ${{ secrets.JRELEASER_SCOOP_PREVIEW_GITHUB_TOKEN }} | |
| run: | | |
| ./mvnw -pl distribution jreleaser:assemble jreleaser:full-release -P preview |