From e286b400f5a04defac8f4b5b70545bf366207afd Mon Sep 17 00:00:00 2001 From: micronaut-build Date: Mon, 15 Feb 2021 18:08:01 +0000 Subject: [PATCH] Update common files --- .github/workflows/bintray-publish.yml | 31 ------------------------- .github/workflows/central-sync.yml | 4 ++-- .github/workflows/dependency-update.yml | 2 +- .github/workflows/gradle.yml | 6 ++--- .github/workflows/release.yml | 8 ++----- MAINTAINING.md | 10 +------- 6 files changed, 9 insertions(+), 52 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..2b311e65 100644 --- a/.github/workflows/central-sync.yml +++ b/.github/workflows/central-sync.yml @@ -34,7 +34,7 @@ jobs: run: | echo $GPG_FILE | base64 -d > secring.gpg if [ -z ${PUBLISH_IN_2_STEPS+x} ]; then - ./gradlew publish closeAndReleaseRepository + ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository else - ./gradlew publish && ./gradlew closeAndReleaseRepository + ./gradlew publishToSonatype && ./gradlew closeAndReleaseSonatypeStagingRepository fi diff --git a/.github/workflows/dependency-update.yml b/.github/workflows/dependency-update.yml index 95ce1918..25ef433f 100644 --- a/.github/workflows/dependency-update.yml +++ b/.github/workflows/dependency-update.yml @@ -27,7 +27,7 @@ jobs: - name: Check Dependencies run: ./gradlew useLatestVersions - name: Create Pull Request - uses: peter-evans/create-pull-request@v3.8.1 + 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/gradle.yml b/.github/workflows/gradle.yml index 81d944e9..55c41519 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -39,11 +39,11 @@ 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 }} + SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} + SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} run: ./gradlew publish docs --no-daemon - name: Determine docs target repository uses: haya14busa/action-cond@v1 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: