fix(build): adjust versioning logic to handle SNAPSHOT and release ve… #2
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: Update Release Draft | |
| on: | |
| push: | |
| branches: [main] | |
| permissions: | |
| contents: write | |
| pull-requests: read | |
| jobs: | |
| update-draft: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v6 | |
| - name: Compute next release version | |
| id: version | |
| run: | | |
| NEXT="$(./gradlew -q printNextReleaseVersion)" | |
| echo "next=${NEXT}" >> "$GITHUB_OUTPUT" | |
| - name: Update release draft | |
| uses: release-drafter/release-drafter@v7 | |
| with: | |
| version: ${{ steps.version.outputs.next }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |