From 0aae6b1a3246dfc7d31ddb40268a2a8bc519488d Mon Sep 17 00:00:00 2001 From: micronaut-build <65172877+micronaut-build@users.noreply.github.com> Date: Thu, 18 Feb 2021 06:48:33 -0500 Subject: [PATCH] [acme] Update common files for branch master (#122) --- .github/workflows/bintray-publish.yml | 31 ------------------------ .github/workflows/central-sync.yml | 7 +----- .github/workflows/dependency-update.yml | 4 +-- .github/workflows/graalvm.yml | 2 +- .github/workflows/gradle.yml | 10 ++++---- .github/workflows/release.yml | 8 ++---- MAINTAINING.md | 10 +------- gradle/wrapper/gradle-wrapper.properties | 2 +- 8 files changed, 13 insertions(+), 61 deletions(-) delete mode 100644 .github/workflows/bintray-publish.yml diff --git a/.github/workflows/bintray-publish.yml b/.github/workflows/bintray-publish.yml deleted file mode 100644 index ad6ce9d1..00000000 --- a/.github/workflows/bintray-publish.yml +++ /dev/null @@ -1,31 +0,0 @@ -# WARNING: Do not edit this file directly. Instead, go to: -# -# https://github.com/micronaut-projects/micronaut-project-template/tree/master/.github/workflows -# -# and edit them there. Note that it will be sync'ed to all the Micronaut repos -name: Bintray Publish -on: - workflow_dispatch: - inputs: - release_version: - description: 'Release version (eg: 1.2.3)' - required: true -jobs: - release: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v2 - with: - token: ${{ secrets.GH_TOKEN }} - ref: v${{ github.event.inputs.release_version }} - - uses: gradle/wrapper-validation-action@v1 - - name: Set up JDK - uses: actions/setup-java@v1 - with: - java-version: 1.8 - - name: Publish to Bintray - env: - BINTRAY_USER: ${{ secrets.BINTRAY_USER }} - BINTRAY_KEY: ${{ secrets.BINTRAY_KEY }} - run: ./gradlew bintrayPublish diff --git a/.github/workflows/central-sync.yml b/.github/workflows/central-sync.yml index 9fb20063..5dc50667 100644 --- a/.github/workflows/central-sync.yml +++ b/.github/workflows/central-sync.yml @@ -30,11 +30,6 @@ jobs: GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }} GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }} GPG_FILE: ${{ secrets.GPG_FILE }} - PUBLISH_IN_2_STEPS: ${{ secrets.PUBLISH_IN_2_STEPS }} run: | echo $GPG_FILE | base64 -d > secring.gpg - if [ -z ${PUBLISH_IN_2_STEPS+x} ]; then - ./gradlew publish closeAndReleaseRepository - else - ./gradlew publish && ./gradlew closeAndReleaseRepository - fi + ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository diff --git a/.github/workflows/dependency-update.yml b/.github/workflows/dependency-update.yml index 7c0ada00..25ef433f 100644 --- a/.github/workflows/dependency-update.yml +++ b/.github/workflows/dependency-update.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: actions/cache@v2 + - uses: actions/cache@v2.1.4 with: path: ~/.gradle/caches key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} @@ -27,7 +27,7 @@ jobs: - name: Check Dependencies run: ./gradlew useLatestVersions - name: Create Pull Request - uses: peter-evans/create-pull-request@v3.8.0 + uses: peter-evans/create-pull-request@v3.8.2 with: token: ${{ secrets.GH_TOKEN }} committer: micronaut-build <${{ secrets.MICRONAUT_BUILD_EMAIL }}> diff --git a/.github/workflows/graalvm.yml b/.github/workflows/graalvm.yml index 6b870a12..f163a66b 100644 --- a/.github/workflows/graalvm.yml +++ b/.github/workflows/graalvm.yml @@ -17,7 +17,7 @@ jobs: graalvm: ['20.3.0.java8', '20.3.0.java11'] steps: - uses: actions/checkout@v2 - - uses: actions/cache@v2.1.2 + - uses: actions/cache@v2.1.4 with: path: ~/.gradle/caches key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 50dfe3e3..bbaed83d 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -22,7 +22,7 @@ jobs: java: ['8', '11', '15'] steps: - uses: actions/checkout@v2 - - uses: actions/cache@v2 + - uses: actions/cache@v2.1.4 with: path: ~/.gradle/caches key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} @@ -39,12 +39,12 @@ jobs: run: ./gradlew dependencyUpdates check --parallel --continue env: TESTCONTAINERS_RYUK_DISABLED: true - - name: Publish to JFrog OSS + - name: Publish to Sonatype Snapshots if: success() && github.event_name == 'push' && matrix.java == '8' env: - BINTRAY_USER: ${{ secrets.BINTRAY_USER }} - BINTRAY_KEY: ${{ secrets.BINTRAY_KEY }} - run: ./gradlew publish docs --no-daemon + SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} + SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} + run: ./gradlew publishToSonatype docs --no-daemon - name: Determine docs target repository uses: haya14busa/action-cond@v1 id: docs_target diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f086aec9..0341a37d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,12 +29,8 @@ jobs: MICRONAUT_BUILD_EMAIL: ${{ secrets.MICRONAUT_BUILD_EMAIL }} with: token: ${{ secrets.GITHUB_TOKEN }} - - name: Upload to Bintray - env: - BINTRAY_USER: ${{ secrets.BINTRAY_USER }} - BINTRAY_KEY: ${{ secrets.BINTRAY_KEY }} - BINTRAY_PUBLISH: ${{ secrets.BINTRAY_PUBLISH }} - run: ./gradlew bintrayUpload docs + - name: Generate docs + run: ./gradlew docs - name: Export Gradle Properties uses: micronaut-projects/github-actions/export-gradle-properties@master - name: Publish to Github Pages diff --git a/MAINTAINING.md b/MAINTAINING.md index c6f0e877..2f03dc3e 100644 --- a/MAINTAINING.md +++ b/MAINTAINING.md @@ -120,7 +120,6 @@ source of truth for certain files. It is used as a template to create new repos, template repo will get propagated automatically. The files propagated are: * Workflow files (`.github/workflows/*`). They are copied using rsync" - * `bintray-publish.yml`. * `central-sync.yml`. * `dependency-update.yml`. * `graalvm.yml`. @@ -175,23 +174,16 @@ will kick off, performing the following steps: * Pre-release: sets the `projectVersion` property in `gradle.properties` to the release version, and commit and pushes the result. -* Uploads and publishes to Bintray. * Generates documentation guide and publishes it to the `gh-pages` branch. * Sends a pull request to Core to update the BOM. * Post-release: * Determines the next patch version, and sets it as a `SNAPSHOT` version. * Closes the milestone that matches the release version, and creates a new one for the next patch. -Note that there are repos (like Core, that has a lot of modules) where uploading and publishing in the same Gradle execution -fails. If you want to upload, but not publish, define a repo secret `BINTRAY_PUBLISH` and set its value to `false`. Then, -once the release workflow has finished, you need to manually trigger the Bintray Publish workflow through the GitHub UI. - If everything goes well, you now need to manually trigger the Maven Central publishing workflow via the GitHub UI. If there is an issue with the release, it's important not to trigger the Maven Central publishing workflow because once -we publish a version to Maven Central we cannot change or remove it anymore. On the other hand, if something failed during -the Bintray upload, docs publication,... we can manually log in into Bintray UI, delete the artifacts, and then restart -the workflow. +we publish a version to Maven Central we cannot change or remove it anymore. There are some properties in `gradle.properties` that affect the release process: diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 28ff446a..2a563242 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists