Skip to content

Commit 7a2d8c4

Browse files
authored
Merge pull request #66 from DeployGate/fix/release_version_check
Fixed the wrong verification of the release version and bump to 4.4.0
2 parents e039da5 + 913fc96 commit 7a2d8c4

File tree

3 files changed

+10
-13
lines changed

3 files changed

+10
-13
lines changed

.github/workflows/release.yml

+1-11
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,13 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- uses: actions/checkout@v3
16-
- run: echo "${GITHUB_REF#refs/tags/}" > VERSION
17-
- run: echo "::set-output name=result::$(cat VERSION)"
18-
id: version
1916
- uses: actions/setup-java@v3
2017
with:
2118
java-version: '8.x'
2219
java-package: jdk
2320
distribution: 'temurin'
2421
cache: 'gradle'
22+
- run: RELEASE_VERSION="${GITHUB_REF#refs/tags/}" ./gradlew verifyReleaseVersion
2523
- name: Set up gradle.properties for sigining and nexus
2624
# Add timeout setting due to https://github.com/DeployGate/gradle-deploygate-plugin/runs/2523846388
2725
run: |
@@ -42,11 +40,3 @@ jobs:
4240
SLACK_TITLE: 'Android SDK Release'
4341
SLACK_MESSAGE: "${{ github.ref }} has been published to Sonatype. ref: https://oss.sonatype.org/"
4442
SLACK_WEBHOOK: ${{ secrets.SHARED_FOR_RELEASE_ARTIFACT_SLACK_INCOMING_WEBHOOK_URL }}
45-
- name: Create Pull Request
46-
uses: peter-evans/[email protected]
47-
with:
48-
title: "Update VERSION information to ${{ steps.version.outputs.result }}"
49-
commit-message: "bump :rocket: ${{ steps.version.outputs.result }}"
50-
branch: "bumped/${{ steps.version.outputs.result }}"
51-
delete-branch: true
52-
add-paths: VERSION

VERSION

-1
This file was deleted.

build.gradle

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22
ext {
3-
releaseVersion = '4.3.0'
3+
releaseVersion = '4.4.0'
44
}
55

66
buildscript {
@@ -24,3 +24,11 @@ allprojects {
2424
task clean(type: Delete) {
2525
delete rootProject.buildDir
2626
}
27+
28+
task verifyReleaseVersion() {
29+
doLast {
30+
if (project.ext.releaseVersion != System.getenv("RELEASE_VERSION")) {
31+
throw new GradleException("${project.ext.releaseVersion} does not equal to ${System.getenv("RELEASE_VERSION")}")
32+
}
33+
}
34+
}

0 commit comments

Comments
 (0)