Merge pull request #39 from StaticFX/development #74
This file contains 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: bump-version | |
on: | |
push: | |
branches: | |
- development | |
- master | |
jobs: | |
bump-gradle-version: | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.bump.outputs.version }} | |
old_version: ${{ steps.bump.outputs.initial-version }} | |
steps: | |
- uses: actions/[email protected] | |
- name: Set up JDK 17 | |
uses: actions/[email protected] | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
cache: 'gradle' | |
- name: Bump Version | |
if: github.ref == 'refs/heads/development' | |
id: bump | |
uses: IMGARENA/version-bump-action@v3 | |
with: | |
github-token: ${{ secrets.JAVA_TOKEN }} | |
- name: Echo Version | |
run: | | |
echo "version=${{ steps.bump.outputs.version }}" >> "$GITHUB_OUTPUT" | |
echo "old_version=${{ steps.bump.outputs.initial-version }}" >> "$GITHUB_OUTPUT" | |
- name: Echo ref | |
run: | | |
echo ${{ github.ref }} | |
echo ${{ github }} | |
trigger-release-workflow: | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/master' | |
needs: [ bump-gradle-version ] | |
outputs: | |
gradle_version: ${{ steps.gradle_version.outputs.gradle_version }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-tags: true | |
fetch-depth: 0 | |
- uses: gradle/actions/setup-gradle@v4 | |
with: | |
gradle-version: 8.7 | |
gradle-home-cache-cleanup: true | |
- name: Retrieve Version | |
run: echo "gradle_version=$(gradle printVersion -q --console=plain)" >> "$GITHUB_OUTPUT" | |
id: gradle_version | |
- name: Trigger publication workflow | |
env: | |
GH_TOKEN: ${{ secrets.JAVA_TOKEN }} | |
run: | | |
gh workflow run publish-package.yml --ref ${{steps.gradle_version.outputs.gradle_version}} | |
gh workflow run publish-documentation.yml --ref ${{steps.gradle_version.outputs.gradle_version}} | |
gh workflow run create-release.yml --ref ${{steps.gradle_version.outputs.gradle_version}} |