File tree Expand file tree Collapse file tree 3 files changed +57
-11
lines changed
Expand file tree Collapse file tree 3 files changed +57
-11
lines changed Original file line number Diff line number Diff line change 33 push :
44 branches :
55 - main
6+ pull_request :
7+ branches :
8+ - main
9+ concurrency :
10+ group : ${{ github.workflow }}-${{ github.ref }}
11+ cancel-in-progress : true
612jobs :
713 build :
814 runs-on : ubuntu-latest
915 timeout-minutes : 10
1016 steps :
1117 - name : Check out the repo
12- uses : actions/checkout@v3
18+ uses : actions/checkout@v4
1319
1420 - name : Set up JDK
15- uses : actions/setup-java@v3
21+ uses : actions/setup-java@v4
1622 with :
1723 java-version : ' 8'
18- distribution : ' temurin '
24+ distribution : ' corretto '
1925 cache : ' gradle'
2026
21- - name : Build with Gradle
22- run : ./gradlew build
23-
24- - name : Release Snapshot
25- run : OSSRH_USER=${{ secrets.OSSRH_USER }} OSSRH_PASSWORD=${{ secrets.OSSRH_PASSWORD }} ./gradlew publish
27+ - name : Build
28+ run : ./gradlew build --no-daemon
Original file line number Diff line number Diff line change 1+ name : Build
2+ on :
3+ push :
4+ branches :
5+ - main
6+ concurrency :
7+ group : ${{ github.workflow }}-${{ github.ref }}
8+ cancel-in-progress : true
9+ jobs :
10+ build :
11+ runs-on : ubuntu-latest
12+ timeout-minutes : 10
13+ steps :
14+ - name : Check out the repo
15+ uses : actions/checkout@v4
16+
17+ - name : Set up JDK
18+ uses : actions/setup-java@v4
19+ with :
20+ java-version : ' 8'
21+ distribution : ' corretto'
22+ cache : ' gradle'
23+
24+ - name : Build with Gradle
25+ run : ./gradlew build --no-daemon
26+
27+ - name : Release Snapshot
28+ run : OSSRH_USER=${{ secrets.OSSRH_USER }} OSSRH_PASSWORD=${{ secrets.OSSRH_PASSWORD }} ./gradlew publish
Original file line number Diff line number Diff line change 99 timeout-minutes : 10
1010 steps :
1111 - name : Check out the repo
12- uses : actions/checkout@v3
12+ uses : actions/checkout@v4
13+
14+ - name : Check version
15+ run : |
16+ VERSION_TAG=${{ github.ref_name }}
17+ VERSION_TAG=${VERSION_TAG#v}
18+ PROJECT_VERSION=$(grep "^version=" gradle.properties | cut -d'=' -f2)
19+ if [[ "$PROJECT_VERSION" == "${VERSION_TAG}-SNAPSHOT" ]]; then
20+ echo "Version match: tag $VERSION_TAG matches project version $PROJECT_VERSION, proceeding with release"
21+ else
22+ echo "Version mismatch: tag $VERSION_TAG does not match project version $PROJECT_VERSION"
23+ exit 1
24+ fi
1325
1426 - name : Set up JDK
15- uses : actions/setup-java@v3
27+ uses : actions/setup-java@v4
1628 with :
1729 java-version : ' 8'
18- distribution : ' temurin '
30+ distribution : ' corretto '
1931 cache : ' gradle'
2032
33+ - name : Build
34+ run : ./gradlew build --no-daemon
35+
2136 - name : Decrypt secring.gpg
2237 run : openssl enc -aes-256-cbc -d -pbkdf2 -in secring.gpg.bin -out secring.gpg -pass pass:${{ secrets.DECRYPT_RING_PASSWORD }}
2338
You can’t perform that action at this time.
0 commit comments