From 2d50b2d8823c142f01994611097ebe0f5726edce Mon Sep 17 00:00:00 2001 From: ebocher Date: Fri, 8 Nov 2024 15:39:09 +0100 Subject: [PATCH] Fix github actions --- .github/workflows/CI release.yml | 19 +++++++++++-------- .github/workflows/CI snapshot.yml | 18 +++++++++++------- docs/CHANGELOG.md | 3 ++- pom.xml | 2 +- 4 files changed, 25 insertions(+), 17 deletions(-) diff --git a/.github/workflows/CI release.yml b/.github/workflows/CI release.yml index 5ad4bf94..c3758fb1 100644 --- a/.github/workflows/CI release.yml +++ b/.github/workflows/CI release.yml @@ -16,6 +16,15 @@ jobs: - name: Checkout uses: actions/checkout@v4 + # Install the GPG secret key + - name: Import GPG Key + run: | + echo "${{ secrets.GPG_PUBLIC_KEY }}" | gpg --import + echo "${{ secrets.GPG_SECRET_KEY }}" | gpg --import --no-tty --batch --yes + env: + GPG_PUBLIC_KEY: ${{ secrets.GPG_PUBLIC_KEY }} + GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }} + # Setup the jdk using version 11 of Adoptium Temurin - name: Setup java 11 using Adoptium Temurin uses: actions/setup-java@v4 @@ -25,7 +34,7 @@ jobs: server-id: ossrh server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD - gpg-private-key: ${{ secrets.GPG_SIGNING_KEY }} + gpg-private-key: ${{ secrets.GPG_SECRET_KEY }} gpg-passphrase: MAVEN_GPG_PASSPHRASE # Setup postgis test DB @@ -44,12 +53,6 @@ jobs: git config user.email "info@orbisgis.org" git config user.name OrbisGIS - #Install the GPG secret key - - name: Install gpg secret key - run: | - cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import - gpg --list-secret-keys --keyid-format LONG - # Test build - name: Build test run: mvn -ntp clean validate compile test javadoc:test-javadoc javadoc:jar @@ -72,7 +75,7 @@ jobs: env: MAVEN_USERNAME: ${{ secrets.MVN_CENTRAL_USERNAME }} MAVEN_PASSWORD: ${{ secrets.MVN_CENTRAL_PASSWORD }} - MAVEN_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_PASSWORD }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} # Export the last git tag into env. - name: Export env values diff --git a/.github/workflows/CI snapshot.yml b/.github/workflows/CI snapshot.yml index ed8fb74e..d5667208 100644 --- a/.github/workflows/CI snapshot.yml +++ b/.github/workflows/CI snapshot.yml @@ -19,6 +19,15 @@ jobs: - name: Checkout uses: actions/checkout@v4 + # Install the GPG secret key + - name: Import GPG Key + run: | + echo "${{ secrets.GPG_PUBLIC_KEY }}" | gpg --import + echo "${{ secrets.GPG_SECRET_KEY }}" | gpg --import --no-tty --batch --yes + env: + GPG_PUBLIC_KEY: ${{ secrets.GPG_PUBLIC_KEY }} + GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }} + # Setup the jdk using version 11 of Adoptium Temurin - name: Setup java 11 using Adoptium Temurin uses: actions/setup-java@v4 @@ -28,7 +37,7 @@ jobs: server-id: ossrh server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD - gpg-private-key: ${{ secrets.GPG_SIGNING_KEY }} + gpg-private-key: ${{ secrets.GPG_SECRET_KEY }} gpg-passphrase: MAVEN_GPG_PASSPHRASE # Setup postgis test DB @@ -41,11 +50,6 @@ jobs: db_user: 'orbisgis' db_name: 'orbisgis_db' - # Install the GPG secret key - - name: Install gpg secret key - run: | - cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import - gpg --list-secret-keys --keyid-format LONG # Deploy the snapshot - name: Deploy @@ -53,4 +57,4 @@ jobs: env: MAVEN_USERNAME: ${{ secrets.MVN_CENTRAL_USERNAME }} MAVEN_PASSWORD: ${{ secrets.MVN_CENTRAL_PASSWORD }} - MAVEN_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_PASSWORD }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 578ef8e2..789b1ab7 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -6,4 +6,5 @@ - Update to H2GIS 2.2.2-SNAPSHOT - Use new sonatype auth - Upgrade many deps : H2, Groovy, Apache Common, JTS -- Clean data API \ No newline at end of file +- Clean data API +- Fix GitHub actions \ No newline at end of file diff --git a/pom.xml b/pom.xml index 47cc2b52..e335b658 100644 --- a/pom.xml +++ b/pom.xml @@ -610,7 +610,7 @@ scm:git:https://github.com/orbisgis/orbisdata.git scm:git:https://github.com/orbisgis/orbisdata.git git@github.com:orbisgis/orbisdata.git - HEAD + HEAD