diff --git a/.github/workflows/release_to_central.yml b/.github/workflows/release_to_central.yml new file mode 100644 index 000000000..f37590894 --- /dev/null +++ b/.github/workflows/release_to_central.yml @@ -0,0 +1,39 @@ +name: Release to central + +on: + workflow_dispatch: + inputs: + version: + description: What version would you like to use? + +permissions: + contents: write + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + name: Checkout code + - name: Setup Java and Maven Central Repo + uses: actions/setup-java@v3 + with: + java-version: '8' + distribution: 'temurin' + server-id: ossrh + server-username: MAVEN_USERNAME + server-password: MAVEN_PASSWORD + gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} + gpg-passphrase: MAVEN_GPG_PASSPHRASE + cache: maven + - name: Setup git config + run: | + git config user.name "Github Release Bot" + git config user.email "<>" + - name: Release + run: mvn -B -DreleaseVersion=${{ inputs.version}} release:prepare release:perform + env: + MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} +