diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fe34742..3c341bf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-java@v3 with: distribution: oracle diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 91a95f8..362af05 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/configure-pages@v3 - uses: actions/jekyll-build-pages@v1 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index eff4093..cd92dc9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,7 @@ jobs: id-token: write steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-java@v3 with: distribution: oracle @@ -34,15 +34,13 @@ jobs: with: node-version-file: .nvmrc cache: yarn - - name: Provision - run: | - sed -i "s/{GRADLE_PUBLISH_KEY}/${{ secrets.GRADLE_PUBLISH_KEY }}/g" gradle.properties - sed -i "s/{GRADLE_PUBLISH_SECRET}/${{ secrets.GRADLE_PUBLISH_SECRET }}/g" gradle.properties - run: ./gradlew build - run: yarn install --immutable - run: yarn release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + ORG_GRADLE_PROJECT_gradlePublishKey: ${{ secrets.GRADLE_PUBLISH_KEY }} + ORG_GRADLE_PROJECT_gradlePublishSecret: ${{ secrets.GRADLE_PUBLISH_SECRET }} pages: uses: ./.github/workflows/pages.yml diff --git a/build.gradle b/build.gradle index 2e16ff3..3da7eb6 100644 --- a/build.gradle +++ b/build.gradle @@ -144,6 +144,20 @@ gradlePlugin { testSourceSets(sourceSets.testkit) } +task preparePublish() { + doLast { + def publishKey = findProperty('gradlePublishKey') + def publishSecret = findProperty('gradlePublishSecret') + + System.properties.setProperty('gradle.publish.key', publishKey) + System.properties.setProperty('gradle.publish.secret', publishSecret) + } +} + tasks.named('check') { dependsOn(testing.suites.testkit) } + +tasks.named('publishPlugins') { + dependsOn(tasks.preparePublish) +} diff --git a/gradle.properties b/gradle.properties index e3ea970..9202e25 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,4 @@ version=0.0.0 -gradle.publish.key={GRADLE_PUBLISH_KEY} -gradle.publish.secret={GRADLE_PUBLISH_SECRET} - org.gradle.parallel=true org.gradle.caching=true