Skip to content

Fix run command

Fix run command #9

Workflow file for this run

name: mcstatuskt-publish
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
publish:
if: ${{ github.repository == 't895/mcstatuskt' }}
runs-on: macos-latest
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
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 > keyring.asc
gpg --dearmor 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