Skip to content

Commit 29f19b0

Browse files
author
Zihlu Wang
authored
Merge pull request #28 from OnixByte/development
1.4.1
2 parents cdc6c66 + 17cd46e commit 29f19b0

File tree

2 files changed

+19
-18
lines changed

2 files changed

+19
-18
lines changed

.github/workflows/github-packages-publish.yml

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,31 @@ jobs:
2020
packages: write
2121

2222
steps:
23-
- uses: actions/checkout@v4
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
26+
- name: Setup GPG TTY
27+
run: export GPG_TTY=$(tty)
28+
29+
- name: Import PGP Private Key
30+
uses: crazy-max/ghaction-import-gpg@v6.1.0
31+
with:
32+
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
33+
passphrase: ${{ secrets.GPG_PASSPHRASE }}
34+
trust_level: 5
35+
36+
- name: Creating PGP Ring Key
37+
run: echo ${{ secrets.GPG_PASSPHRASE }} | gpg --batch --yes --pinentry-mode loopback --passphrase-fd 0 --export-secret-keys -o gpg_key.ring
2438

2539
- name: Restore gradle.properties
2640
env:
2741
GRADLE_PROPERTIES: ${{ secrets.GRADLE_PROPERTIES }}
2842
shell: bash
2943
run: |
3044
mkdir -p ~/.gradle/
31-
echo "::set-env name=GRADLE_USER_HOME::$HOME/.gradle"
45+
export GRADLE_USER_HOME=~/.gradle
3246
echo ${GRADLE_PROPERTIES} > ~/.gradle/gradle.properties
3347
34-
- name: Restore gpg secret ring file
35-
env:
36-
GPG_SECRET_KEY_RING: ${{ secrets.GPG_SECRET_KEY_RING }}
37-
shell: bash
38-
run: |
39-
mkdir -p ~/.gnupg/
40-
echo ${GPG_SECRET_KEY_RING} > ~/.gnupg/42CBCB82.gpg
41-
4248
- name: Set up JDK 17
4349
uses: actions/setup-java@v4
4450
with:
@@ -56,10 +62,5 @@ jobs:
5662
- name: Build with Gradle
5763
run: ./gradlew build
5864

59-
# The USERNAME and TOKEN need to correspond to the credentials environment variables used in
60-
# the publishing section of your build.gradle
61-
- name: Publish to GitHub Packages
62-
run: ./gradlew publishAllPublicationsToGithubPackagesRepository
63-
env:
64-
USERNAME: ${{ github.actor }}
65-
TOKEN: ${{ secrets.GITHUB_TOKEN }}
65+
- name: Publish to Maven Central
66+
run: ./gradlew publish

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ springVersion=6.1.3
2727
springBootVersion=3.2.3
2828

2929
buildGroupId=com.onixbyte
30-
buildVersion=1.4.0
30+
buildVersion=1.4.1
3131
projectUrl=https://onixbyte.com/JDevKit
3232
projectGithubUrl=https://github.com/OnixByte/JDevKit
3333
licenseName=The Apache License, Version 2.0

0 commit comments

Comments
 (0)