From 90fddcf3a66d8044a99c2a9215fe9da2cae4b65e Mon Sep 17 00:00:00 2001 From: Michael Yan Date: Sat, 11 May 2024 13:49:25 +0800 Subject: [PATCH] Update github workflows --- .github/workflows/gradle.yml | 19 ++++++------------- .github/workflows/release-notes.yml | 2 +- .github/workflows/release.yml | 7 ++----- 3 files changed, 9 insertions(+), 19 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 9e161ff..67e2a1e 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -2,10 +2,10 @@ name: Grace CI on: push: branches: - - 'main' + - main pull_request: branches: - - 'main' + - main workflow_dispatch: jobs: build: @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: ['8', '11'] + java: ['11'] env: WORKSPACE: ${{ github.workspace }} steps: @@ -32,10 +32,6 @@ jobs: - name: Run Build id: build uses: gradle/gradle-build-action@v3 - env: - GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} - GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} - GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} with: arguments: build -x test publish: @@ -52,11 +48,11 @@ jobs: uses: actions/checkout@v4 with: token: ${{ secrets.GITHUB_TOKEN }} - - name: Set up JDK 8 + - name: Set up JDK 11 uses: actions/setup-java@v4 with: distribution: 'adopt' - java-version: 8 + java-version: 11 - name: Generate secring file env: SECRING_FILE: ${{ secrets.SECRING_FILE }} @@ -65,9 +61,6 @@ jobs: id: publish uses: gradle/gradle-build-action@v3 env: - GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} - GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} - GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} SONATYPE_NEXUS_URL: ${{ secrets.SONATYPE_NEXUS_URL }} @@ -76,4 +69,4 @@ jobs: SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }} SECRING_FILE: ${{ secrets.SECRING_FILE }} with: - arguments: -Psigning.secretKeyRingFile=${{ github.workspace }}/secring.gpg publishToSonatype closeAndReleaseSonatypeStagingRepository + arguments: -Psigning.secretKeyRingFile=${{ github.workspace }}/secring.gpg :plugin:publishToSonatype closeAndReleaseSonatypeStagingRepository diff --git a/.github/workflows/release-notes.yml b/.github/workflows/release-notes.yml index dd5f706..88af967 100644 --- a/.github/workflows/release-notes.yml +++ b/.github/workflows/release-notes.yml @@ -10,7 +10,7 @@ jobs: release_notes: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Check if it has release drafter config file id: check_release_drafter run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c109384..7a34eb9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,7 +27,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: ['8'] + java: ['11'] env: GIT_USER_NAME: rainboyan GIT_USER_EMAIL: rain@rainboyan.com @@ -62,9 +62,6 @@ jobs: if: steps.secring.outcome == 'success' uses: gradle/gradle-build-action@v3 env: - GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} - GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} - GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} SONATYPE_NEXUS_URL: ${{ secrets.SONATYPE_NEXUS_URL }} @@ -73,4 +70,4 @@ jobs: SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }} SECRING_FILE: ${{ secrets.SECRING_FILE }} with: - arguments: -Psigning.secretKeyRingFile=${{ github.workspace }}/secring.gpg publishToSonatype closeAndReleaseSonatypeStagingRepository + arguments: -Psigning.secretKeyRingFile=${{ github.workspace }}/secring.gpg :plugin:publishToSonatype closeAndReleaseSonatypeStagingRepository