From 1971f37f334c1b1cdc3cb0cd806c203c9e40b9bd Mon Sep 17 00:00:00 2001 From: ptiurin Date: Mon, 23 Dec 2024 13:41:02 +0000 Subject: [PATCH 1/8] auto bump version --- .github/workflows/release.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4cbf1a64..e5206c36 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,7 +10,38 @@ on: required: true jobs: + bump-version: + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v4 + + - name: Bump version + run: | + newVersion=$(echo $newVersion | sed 's/^v//') + sed -i.bak "s/^version=.*/version=$newVersion/" gradle.properties + rm gradle.properties.bak + env: + newVersion: ${{ github.event.release.tag_name || github.event.inputs.tag_name }} + + - name: Setup git config + run: | + git config user.name "GitHub Actions Bot" + git config user.email "<>" + + - name: Commit version bump + run: | + git add gradle.properties + git commit -m "Bump version to $newVersion" + env: + newVersion: ${{ github.event.release.tag_name || github.event.inputs.tag_name }} + + - name: Push changes + run: git push + + build: + needs: bump-version uses: ./.github/workflows/build.yml publish: From fdb481cdd4244bae6a42a10404e09852aeb99dcb Mon Sep 17 00:00:00 2001 From: ptiurin Date: Mon, 23 Dec 2024 14:05:00 +0000 Subject: [PATCH 2/8] standalone --- .github/workflows/release.yml | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e5206c36..64a93e0d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,8 +1,6 @@ name: Release new version on: - release: - types: [published] workflow_dispatch: inputs: tag_name: @@ -12,6 +10,8 @@ on: jobs: bump-version: runs-on: ubuntu-latest + env: + newVersion: ${{ github.event.inputs.tag_name }} steps: - name: Check out code uses: actions/checkout@v4 @@ -21,8 +21,6 @@ jobs: newVersion=$(echo $newVersion | sed 's/^v//') sed -i.bak "s/^version=.*/version=$newVersion/" gradle.properties rm gradle.properties.bak - env: - newVersion: ${{ github.event.release.tag_name || github.event.inputs.tag_name }} - name: Setup git config run: | @@ -32,12 +30,17 @@ jobs: - name: Commit version bump run: | git add gradle.properties - git commit -m "Bump version to $newVersion" - env: - newVersion: ${{ github.event.release.tag_name || github.event.inputs.tag_name }} + git commit -m "chore: Bump version to $newVersion" + + - name: Tag version + run: | + git tag $newVersion - name: Push changes - run: git push + run: | + git push origin master + # Push tag + git push origin $newVersion build: @@ -51,7 +54,7 @@ jobs: - name: Check out code uses: actions/checkout@v3 with: - ref: ${{ github.event.release.tag_name || github.event.inputs.tag_name}} + ref: ${{ github.event.inputs.tag_name}} - name: Download uber-jar uses: actions/download-artifact@v4.1.7 with: @@ -67,6 +70,7 @@ jobs: file: ${{ needs.build.outputs.uber-jar }} tags: true draft: false + tag_name: ${{ github.event.inputs.tag_name }} - name: Deploy to Maven Central repository run: ./gradlew publish env: From 4572948faa0e8efada3360688a30f78f09c37526 Mon Sep 17 00:00:00 2001 From: ptiurin Date: Mon, 23 Dec 2024 14:09:53 +0000 Subject: [PATCH 3/8] test changes --- .github/workflows/release.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 64a93e0d..b3425576 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,6 +15,8 @@ jobs: steps: - name: Check out code uses: actions/checkout@v4 + with: + ref: ci-auto-version-bump - name: Bump version run: | @@ -38,7 +40,7 @@ jobs: - name: Push changes run: | - git push origin master + git push origin ci-auto-version-bump # Push tag git push origin $newVersion @@ -71,10 +73,10 @@ jobs: tags: true draft: false tag_name: ${{ github.event.inputs.tag_name }} - - name: Deploy to Maven Central repository - run: ./gradlew publish - env: - MAVEN_REPO_USERNAME: ${{ secrets.MAVEN_REPO_USERNAME }} - MAVEN_REPO_PASSWORD: ${{ secrets.MAVEN_REPO_PASSWORD }} - GRADLE_SIGNING_KEY: ${{ secrets.GRADLE_SIGNING_KEY }} - GRADLE_SIGNING_PASSWORD: ${{ secrets.GRADLE_SIGNING_PASSWORD }} + # - name: Deploy to Maven Central repository + # run: ./gradlew publish + # env: + # MAVEN_REPO_USERNAME: ${{ secrets.MAVEN_REPO_USERNAME }} + # MAVEN_REPO_PASSWORD: ${{ secrets.MAVEN_REPO_PASSWORD }} + # GRADLE_SIGNING_KEY: ${{ secrets.GRADLE_SIGNING_KEY }} + # GRADLE_SIGNING_PASSWORD: ${{ secrets.GRADLE_SIGNING_PASSWORD }} From 42f6685f156944adaff98f797b6e9c24a2916e1d Mon Sep 17 00:00:00 2001 From: GitHub Actions Bot <> Date: Mon, 23 Dec 2024 14:11:42 +0000 Subject: [PATCH 4/8] chore: Bump version to v0.0.1 --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 8e1b90d9..403b2577 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,2 @@ -version=3.5.0 +version=0.0.1 jdbcVersion=4.3 From f87f61bcc27bf9459494a641161252a7779574c6 Mon Sep 17 00:00:00 2001 From: ptiurin Date: Mon, 23 Dec 2024 14:30:24 +0000 Subject: [PATCH 5/8] build branch and draft --- .github/workflows/release.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b3425576..c7b6f36b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -48,6 +48,8 @@ jobs: build: needs: bump-version uses: ./.github/workflows/build.yml + with: + branch: ${{ github.event.inputs.tag_name }} publish: runs-on: ubuntu-latest @@ -71,7 +73,7 @@ jobs: with: file: ${{ needs.build.outputs.uber-jar }} tags: true - draft: false + draft: true tag_name: ${{ github.event.inputs.tag_name }} # - name: Deploy to Maven Central repository # run: ./gradlew publish From fea850b90c2a49bc7c857e89c1828b98748003fd Mon Sep 17 00:00:00 2001 From: GitHub Actions Bot <> Date: Mon, 23 Dec 2024 14:30:54 +0000 Subject: [PATCH 6/8] chore: Bump version to v0.0.2 --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 403b2577..8af0b752 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,2 @@ -version=0.0.1 +version=0.0.2 jdbcVersion=4.3 From 30924f66ff53221fbda80fe107e161f60f355660 Mon Sep 17 00:00:00 2001 From: GitHub Actions Bot <> Date: Mon, 23 Dec 2024 14:33:11 +0000 Subject: [PATCH 7/8] chore: Bump version to v3.0.999 --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 8af0b752..5f51e952 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,2 @@ -version=0.0.2 +version=3.0.999 jdbcVersion=4.3 From 9fbdfcc27cd6b7b10287f9c70a7c4fd2b15de531 Mon Sep 17 00:00:00 2001 From: ptiurin Date: Mon, 23 Dec 2024 14:50:14 +0000 Subject: [PATCH 8/8] revert test changes --- .github/workflows/release.yml | 22 ++++++++++------------ gradle.properties | 2 +- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c7b6f36b..dbf9e231 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,10 +15,8 @@ jobs: steps: - name: Check out code uses: actions/checkout@v4 - with: - ref: ci-auto-version-bump - - name: Bump version + - name: Bump version in gradle.properties run: | newVersion=$(echo $newVersion | sed 's/^v//') sed -i.bak "s/^version=.*/version=$newVersion/" gradle.properties @@ -40,7 +38,7 @@ jobs: - name: Push changes run: | - git push origin ci-auto-version-bump + git push origin master # Push tag git push origin $newVersion @@ -73,12 +71,12 @@ jobs: with: file: ${{ needs.build.outputs.uber-jar }} tags: true - draft: true + draft: false tag_name: ${{ github.event.inputs.tag_name }} - # - name: Deploy to Maven Central repository - # run: ./gradlew publish - # env: - # MAVEN_REPO_USERNAME: ${{ secrets.MAVEN_REPO_USERNAME }} - # MAVEN_REPO_PASSWORD: ${{ secrets.MAVEN_REPO_PASSWORD }} - # GRADLE_SIGNING_KEY: ${{ secrets.GRADLE_SIGNING_KEY }} - # GRADLE_SIGNING_PASSWORD: ${{ secrets.GRADLE_SIGNING_PASSWORD }} + - name: Deploy to Maven Central repository + run: ./gradlew publish + env: + MAVEN_REPO_USERNAME: ${{ secrets.MAVEN_REPO_USERNAME }} + MAVEN_REPO_PASSWORD: ${{ secrets.MAVEN_REPO_PASSWORD }} + GRADLE_SIGNING_KEY: ${{ secrets.GRADLE_SIGNING_KEY }} + GRADLE_SIGNING_PASSWORD: ${{ secrets.GRADLE_SIGNING_PASSWORD }} diff --git a/gradle.properties b/gradle.properties index 5f51e952..8e1b90d9 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,2 @@ -version=3.0.999 +version=3.5.0 jdbcVersion=4.3