2022-03-16 08:30:07 -07:00
|
|
|
# Although our CI builds should automatically close and release repositories after publishing, sometimes
|
|
|
|
# this process can fail. This GitHub Action allows a team member to manually unwedge this stuck deployment.
|
|
|
|
|
|
|
|
# Expected secrets
|
|
|
|
# MAVEN_CENTRAL_USERNAME - Username for Maven Central
|
|
|
|
# MAVEN_CENTRAL_PASSWORD - Password for Maven Central
|
|
|
|
|
2022-03-27 10:53:26 -07:00
|
|
|
name: Close and release repository
|
2022-03-16 08:30:07 -07:00
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
|
|
|
mavenCentralRepository:
|
|
|
|
description: 'Repository name to close'
|
|
|
|
required: true
|
|
|
|
|
2022-03-27 10:53:26 -07:00
|
|
|
concurrency: deploy_release
|
2022-03-16 08:30:07 -07:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
validate_gradle_wrapper:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
timeout-minutes: 1
|
2022-04-28 11:41:34 -07:00
|
|
|
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
|
2022-03-16 08:30:07 -07:00
|
|
|
# Gradle Wrapper validation can be flaky
|
|
|
|
# https://github.com/gradle/wrapper-validation-action/issues/40
|
|
|
|
- name: Gradle Wrapper Validation
|
|
|
|
timeout-minutes: 1
|
|
|
|
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
|
|
|
|
|
|
|
|
unwedge:
|
|
|
|
environment: deployment
|
|
|
|
needs: validate_gradle_wrapper
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
timeout-minutes: 1
|
2022-04-28 11:41:34 -07:00
|
|
|
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
|
2022-03-16 08:30:07 -07:00
|
|
|
- name: Setup
|
|
|
|
id: setup
|
|
|
|
timeout-minutes: 30
|
|
|
|
uses: ./.github/actions/setup
|
|
|
|
- name: Close and release repository
|
|
|
|
timeout-minutes: 8
|
|
|
|
env:
|
|
|
|
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
|
|
|
|
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
|
|
|
|
ORG_GRADLE_PROJECT_IS_SNAPSHOT: true
|
|
|
|
ORG_GRADLE_PROJECT_RELEASE_SIGNING_ENABLED: false
|
|
|
|
run: |
|
|
|
|
./gradlew closeAndReleaseRepository --repository="${{ github.event.inputs.mavenCentralRepository }}" --no-parallel
|