Release #89
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: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| repository-projects: write | |
| env: | |
| CERTIFICATE_CHAIN: ${{ secrets.CERTIFICATE_CHAIN }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} | |
| PRIVATE_KEY_PASSWORD: ${{ secrets.PRIVATE_KEY_PASSWORD }} | |
| PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| # Fetch all history. | |
| fetch-depth: 0 | |
| - name: Setup Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: 21 | |
| - name: Prepare release name | |
| run: | | |
| VERSION_NAME=$(grep "^VERSION_NAME=" gradle.properties | cut -d '=' -f 2) | |
| IS_SNAPSHOT=false | |
| if [[ $VERSION_NAME == *-SNAPSHOT ]]; then | |
| IS_SNAPSHOT=true | |
| else | |
| IS_SNAPSHOT=false | |
| fi | |
| echo "VERSION_NAME=$VERSION_NAME" | |
| echo "IS_SNAPSHOT=$IS_SNAPSHOT" | |
| echo "VERSION_NAME=$VERSION_NAME" >> $GITHUB_ENV | |
| echo "IS_SNAPSHOT=$IS_SNAPSHOT" >> $GITHUB_ENV | |
| - name: Build CLI | |
| run: ./gradlew buildCLI | |
| - name: Delete release if exist then create a new one | |
| run: | | |
| gh release create ${{ env.VERSION_NAME }} tools/cli/build/distributions/*.zip --generate-notes --draft | |