From f43798d52e2d6de97750e15bfb0db8a619c66356 Mon Sep 17 00:00:00 2001 From: Goooler Date: Tue, 13 Aug 2024 09:00:54 +0800 Subject: [PATCH] Remove deploy-pages job and declare repository_owner for release job --- .github/workflows/ci.yml | 23 ----------------------- .github/workflows/release.yml | 7 ++++--- 2 files changed, 4 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 846b25fdd..00dbb0009 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,26 +42,3 @@ jobs: env: ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.OSSRH_USER }} ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.OSSRH_PASSWORD }} - - deploy-pages: - runs-on: ubuntu-latest - permissions: - contents: write - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v4 - with: - distribution: 'zulu' - java-version: 21 - - uses: gradle/actions/setup-gradle@v4 - with: - cache-read-only: true - - uses: actions/setup-node@v4 - with: - # Due to some limitations of https://github.com/node-gradle/gradle-node-plugin. - node-version: '16' - - run: ./gradlew gitPublishPush --no-configuration-cache - env: - # https://ajoberstar.org/grgit/main/grgit-authentication.html#_environment_variables - GRGIT_USER: ${{ github.repository_owner }} - GRGIT_PASS: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ab0f89da1..260794322 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,13 +25,14 @@ jobs: # Due to some limitations of https://github.com/node-gradle/gradle-node-plugin. node-version: '16' # Disable CC due to https://github.com/gradle/gradle/issues/22779 - # gitPublishPush doesn't work due to credentials issue. - - run: ./gradlew publish publishPlugins --no-configuration-cache + - run: ./gradlew release --no-configuration-cache env: GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_KEY }} GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_SECRET }} + # We must declare repository_owner as the user, workaround for https://github.com/ajoberstar/gradle-git-publish/issues/109. + GRGIT_USER: ${{ github.repository_owner }} # https://ajoberstar.org/grgit/main/grgit-authentication.html#_environment_variables - GRGIT_USER: ${{ secrets.GITHUB_TOKEN }} + GRGIT_PASS: ${{ secrets.GITHUB_TOKEN }} ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.OSSRH_USER }} ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.OSSRH_PASSWORD }} ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_KEY }}