Disable configuration cache for publishing #11
This file contains 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
name: mcstatuskt-publish | |
on: | |
push: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
publish: | |
if: ${{ github.repository == 't895/mcstatuskt' }} | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Set up Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Give execution permissions to the gradle wrapper | |
run: chmod +x ./gradlew | |
- name: Create secrets file | |
run: | | |
echo "${{secrets.SIGNING_SECRET_KEYRING_BASE64}}" | base64 --decode > ${HOME}/keyring.asc | |
gpg --output ${HOME}/keyring.asc.gpg --dearmor ${HOME}/keyring.asc | |
- name: Set up environment | |
run: | | |
echo "mavenCentralUsername=${{secrets.MAVEN_USERNAME}}" >> gradle.properties | |
echo "mavenCentralPassword=${{secrets.MAVEN_PASSWORD}}" >> gradle.properties | |
echo "signing.keyId=${{secrets.SIGNING_KEY_ID}}" >> gradle.properties | |
echo "signing.password=${{secrets.SIGNING_PASSWORD}}" >> gradle.properties | |
echo "signing.secretKeyRingFile=${HOME}/keyring.asc.gpg" >> gradle.properties | |
- name: Setup Xcode | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: latest-stable | |
- name: Build and publish | |
run: ./gradlew publishAndReleaseToMavenCentral --no-configuration-cache |