From 369ff791d6297f276fcfbdc6dcbe777310e05765 Mon Sep 17 00:00:00 2001 From: Joakim Taule Kartveit Date: Fri, 30 Aug 2024 14:12:55 +0200 Subject: [PATCH] chore: changed relese and deploy steps --- .github/workflows/release.yml | 22 ++++++++++++++++++++++ build.gradle.kts | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4c7207d..796c787 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,10 +28,32 @@ jobs: key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} restore-keys: | ${{ runner.os }}-gradle-wrapper- + - name: verify release & deploy configuration + run: ./gradlew -Pversion=${{ env.NEW_VERSION }} jreleaserConfig + env: + GITHUB_USERNAME: x-access-token + GITHUB_PASSWORD: ${{ secrets.GITHUB_TOKEN }} + JRELEASER_MAVENCENTRAL_USERNAME: ${{ secrets.MAVEN_USERNAME }} + JRELEASER_MAVENCENTRAL_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} + JRELEASER_GPG_SECRET_KEY: ${{ secrets.OSSRH_GPG_SECRET_KEY }} + JRELEASER_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} + ORG_GRADLE_PROJECT_signingKey: ${{ secrets.OSSRH_GPG_SECRET_KEY }} + ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} - name: build artifact run: ./gradlew -Pversion=${{ env.NEW_VERSION }} build - name: upload artifact run: ./gradlew -Pversion=${{ env.NEW_VERSION }} publish + env: + GITHUB_USERNAME: x-access-token + GITHUB_PASSWORD: ${{ secrets.GITHUB_TOKEN }} + JRELEASER_MAVENCENTRAL_USERNAME: ${{ secrets.MAVEN_USERNAME }} + JRELEASER_MAVENCENTRAL_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} + JRELEASER_GPG_SECRET_KEY: ${{ secrets.OSSRH_GPG_SECRET_KEY }} + JRELEASER_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} + ORG_GRADLE_PROJECT_signingKey: ${{ secrets.OSSRH_GPG_SECRET_KEY }} + ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} + - name: deploy and release artifact to maven central + run: ./gradlew -Pversion=${{ env.NEW_VERSION }} jreleaserFullRelease env: GITHUB_USERNAME: x-access-token GITHUB_PASSWORD: ${{ secrets.GITHUB_TOKEN }} diff --git a/build.gradle.kts b/build.gradle.kts index d08ab37..5dcdcf1 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -42,7 +42,6 @@ jreleaser { signing { active.set(Active.ALWAYS) armored = true - verify = false } deploy { maven { @@ -81,6 +80,7 @@ publishing { name.set("norwegian-organization-number-validator") description.set("Library for validation a norwegian organization number") url.set("https://github.com/MikAoJk/norwegian-organization-number-validator") + inceptionYear.set("2024") licenses { license { name.set("MIT License")