From 96b2588c27f571aecf54be98e0b1ad216aed2658 Mon Sep 17 00:00:00 2001 From: Tim Chow Date: Tue, 23 Jul 2024 09:25:11 -0500 Subject: [PATCH] Add Setup Java step to Version Bump and Github Release release jobs and add temp workflow (#1077) --- .github/workflows/release.yml | 4 ++ .github/workflows/temp_release.yml | 59 ++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 .github/workflows/temp_release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1e86f3fedc..e324b6f6fc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -252,6 +252,8 @@ jobs: steps: - name: Checkout Repository uses: actions/checkout@v2 + - name: Setup Java + uses: ./.github/actions/setup - name: Set GitHub User uses: ./.github/actions/set_github_user - name: Update Version @@ -277,6 +279,8 @@ jobs: steps: - name: Checkout Repository uses: actions/checkout@v2 + - name: Setup Java + uses: ./.github/actions/setup - name: Save changelog entries to a file run: | sed -e '1,/##/d' -e '/##/,$d' CHANGELOG.md > changelog_entries.md diff --git a/.github/workflows/temp_release.yml b/.github/workflows/temp_release.yml new file mode 100644 index 0000000000..383a67487a --- /dev/null +++ b/.github/workflows/temp_release.yml @@ -0,0 +1,59 @@ +name: Temp Release Workflow +on: + workflow_dispatch: + inputs: + version: + description: 'Version to release' + required: true +env: + SIGNING_KEY_FILE_PATH: /home/runner/secretKey.gpg +jobs: + bump_version: + name: Bump Version + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + - name: Setup Java + uses: ./.github/actions/setup + - name: Set GitHub User + uses: ./.github/actions/set_github_user + - name: Update Version + run: | + ./gradlew -PversionParam=${{ github.event.inputs.version }} changeGradleReleaseVersion + ./gradlew -PversionParam=${{ github.event.inputs.version }} changeREADMEVersion + ./gradlew -PversionParam=${{ github.event.inputs.version }} changeMigrationGuideVersion + ./gradlew -PversionParam=${{ github.event.inputs.version }} updateCHANGELOGVersion + ./gradlew dokkaHtmlMultiModule + git add -A + git commit -am 'Release ${{ github.event.inputs.version }}' + git tag ${{ github.event.inputs.version }} -a -m 'Release ${{ github.event.inputs.version }}' + + ./gradlew -PversionParam=${{ github.event.inputs.version }} incrementSNAPSHOTVersion + ./gradlew incrementVersionCode + git commit -am 'Prepare for development' + git push origin main ${{ github.event.inputs.version }} + + create_github_release: + needs: [ bump_version ] + name: Create GitHub Release + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + - name: Setup Java + uses: ./.github/actions/setup + - name: Save changelog entries to a file + run: | + sed -e '1,/##/d' -e '/##/,$d' CHANGELOG.md > changelog_entries.md + - name: Create GitHub release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.event.inputs.version }} + release_name: ${{ github.event.inputs.version }} + body_path: changelog_entries.md + draft: false + prerelease: false