Skip to content

deploy-action

deploy-action #4

Workflow file for this run

name: deploy-action
on:
push:
tags:
- '*'
jobs:
deploy-job:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
cache: gradle
- name: decode key
env:
secringEncodingKey: ${{secrets.MC_SECRING_ENC_KEY}}
run: gpg --quiet --batch --yes --decrypt --passphrase="$secringEncodingKey" --output secring.gpg secring.gpg.gpgenc
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
- name: deploy
env:
repositoryUrl: ${{secrets.MC_REPOSITORY_URL}}
repositoryUser: ${{secrets.MC_REPOSITORY_USER}}
repositoryPassword: ${{secrets.MC_REPOSITORY_PASSWORD}}
signingKeyId: ${{secrets.MC_SIGNING_KEY_ID}}
signingPassword: ${{secrets.MC_SIGNING_PASSWORD}}
run: ./gradlew -PsigningSecretKeyRingFile="`pwd`/secring.gpg" -Dorg.gradle.internal.publish.checksums.insecure=true --info clean build publishToSonatype closeAndReleaseRepository
- name: Cleanup Gradle Cache
run: |
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -f ~/.gradle/caches/modules-2/gc.properties
- name: Cleanup
run: |
rm secring.gpg