From a4b01e931076d21fdc5c88471fe56ba6551c67f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Spie=C3=9F?= Date: Wed, 21 Aug 2024 11:10:55 +0200 Subject: [PATCH] Add publish api task --- .github/workflows/publish-api.yml | 33 +++++++++++++++++++++++++++++++ .github/workflows/publish.yml | 2 +- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/publish-api.yml diff --git a/.github/workflows/publish-api.yml b/.github/workflows/publish-api.yml new file mode 100644 index 0000000..542e954 --- /dev/null +++ b/.github/workflows/publish-api.yml @@ -0,0 +1,33 @@ +name: publish-natives-macos + +on: + push: + branches: [ "master" ] + paths: + - '.github/workflows/publish-api.yml' # when new targets are added + - 'build.gradle.kts' # when the root build script changes + - 'api' # when api source is changed + +concurrency: + group: "pub-api" + cancel-in-progress: true + +jobs: + publish: + name: Publish API dependency + environment: MavenRelease + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v4 + + - name: Publish + env: + ORG_GRADLE_PROJECT_ossrhUser: ${{ secrets.OSSRH_USER }} + ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.OSSRH_PASSWORD }} + ORG_GRADLE_PROJECT_stagingProfile: ${{ secrets.STAGING_PROFILE_ID }} + ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_KEY }} + ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.GPG_KEYID }} + run: | + chmod u+x gradlew + ./gradlew --console plain --stacktrace -Ptarget=x86_64-unknown-linux-gnu api:publishToSonatype closeAndReleaseStagingRepository diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4d7c362..90b6a54 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -33,7 +33,7 @@ jobs: image: ubuntu:16.04 steps: - name: Checkout sources - uses: actions/checkout@v4 + uses: actions/checkout@v3 - name: Install Essentials run: | apt-get update -y