Deploy to OSSRH #6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/line/lich/blob/master/.github/workflows/ossrh.yml | |
name: Deploy to OSSRH | |
on: | |
workflow_dispatch: | |
inputs: | |
cond_release: | |
description: 'Type "release" to release artifacts to Maven Central.' | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
environment: deploy | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: gradle/wrapper-validation-action@v1 | |
- uses: actions/setup-java@v1 | |
with: | |
java-version: 11 | |
- name: Deploy artifacts | |
env: | |
ORG_GRADLE_PROJECT_repositoryUsername: ${{ secrets.OSSRH_USERNAME }} | |
ORG_GRADLE_PROJECT_repositoryPassword: ${{ secrets.OSSRH_PASSWORD }} | |
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }} | |
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }} | |
run: | | |
cat libpng_version | xargs ./download_libpng_and_apply_apng_patch.sh | |
./gradlew publish | |
- name: Release to Maven Central | |
if: ${{ github.event.inputs.cond_release == 'release' }} | |
env: | |
ORG_GRADLE_PROJECT_nexusUsername: ${{ secrets.OSSRH_USERNAME }} | |
ORG_GRADLE_PROJECT_nexusPassword: ${{ secrets.OSSRH_PASSWORD }} | |
run: ./gradlew closeAndReleaseRepository |