ci: add steps used to publish artefacts to maven central
This commit is contained in:
@@ -20,7 +20,19 @@ jobs:
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Import PGP Private Key
|
||||
uses: crazy-max/ghaction-import-gpg@v6.1.0
|
||||
with:
|
||||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||
passphrase: ${{ secrets.GPG_PASSPHRASE }}
|
||||
|
||||
- name: Creating PGP Ring Key
|
||||
run: |
|
||||
mkdir -p ~/.gnupg
|
||||
gpg --export-secret-keys -o ~/.gnupg/pgp_key.ring
|
||||
|
||||
- name: Restore gradle.properties
|
||||
env:
|
||||
@@ -31,14 +43,6 @@ jobs:
|
||||
echo "::set-env name=GRADLE_USER_HOME::$HOME/.gradle"
|
||||
echo ${GRADLE_PROPERTIES} > ~/.gradle/gradle.properties
|
||||
|
||||
- name: Restore gpg secret ring file
|
||||
env:
|
||||
GPG_SECRET_KEY_RING: ${{ secrets.GPG_SECRET_KEY_RING }}
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p ~/.gnupg/
|
||||
echo ${GPG_SECRET_KEY_RING} > ~/.gnupg/42CBCB82.gpg
|
||||
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
@@ -58,8 +62,11 @@ jobs:
|
||||
|
||||
# The USERNAME and TOKEN need to correspond to the credentials environment variables used in
|
||||
# the publishing section of your build.gradle
|
||||
- name: Publish to GitHub Packages
|
||||
run: ./gradlew publishAllPublicationsToGithubPackagesRepository
|
||||
env:
|
||||
USERNAME: ${{ github.actor }}
|
||||
TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# - name: Publish to GitHub Packages
|
||||
# run: ./gradlew publishAllPublicationsToGithubPackagesRepository
|
||||
# env:
|
||||
# USERNAME: ${{ github.actor }}
|
||||
# TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Publish to Maven Central
|
||||
run: ./gradlew publish
|
||||
|
||||
Reference in New Issue
Block a user