Publish #32
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: Publish | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
required: true | |
description: The reference or tag | |
java: | |
required: true | |
description: The build java version | |
jobs: | |
publish: | |
name: Publish Mindustry and Arc | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
path: xpdustry-helper | |
- name: Set up JDK | |
uses: actions/setup-java@v1 | |
with: | |
java-version: ${{ github.event.inputs.java }} | |
- name: Checkout Mindustry | |
uses: actions/checkout@v4 | |
with: | |
repository: 'Anuken/Mindustry' | |
ref: ${{ github.event.inputs.version }} | |
path: Mindustry | |
- name: Checkout Arc | |
uses: actions/checkout@v4 | |
with: | |
repository: 'Anuken/Arc' | |
ref: ${{ github.event.inputs.version }} | |
path: Arc | |
- name: Build and Publish Mindustry and Arc | |
env: | |
VERSION: ${{ github.event.inputs.version }} | |
ORG_GRADLE_PROJECT_xpdustryUsername: "${{ secrets.XPDUSTRY_MAVEN_USERNAME }}" | |
ORG_GRADLE_PROJECT_xpdustryPassword: "${{ secrets.XPDUSTRY_MAVEN_PASSWORD }}" | |
ORG_GRADLE_PROJECT_signingKey: "${{ secrets.XPDUSTRY_MAVEN_SIGNING_KEY }}" | |
ORG_GRADLE_PROJECT_signingPassword: "${{ secrets.XPDUSTRY_MAVEN_SIGNING_PASSWORD }}" | |
run: | | |
export JITPACK=true | |
cd ./Arc | |
./gradlew -Pversion="$VERSION" -Dfile.encoding=UTF-8 -Dhttps.protocols=TLSv1.2 -xtest -xjavadoc assemble publishToMavenLocal publishMavenPublicationToXpdustryRepository | |
cd ../Mindustry | |
sed -i "s/^archash=.*/archash=$VERSION/" ./gradle.properties | |
./gradlew -Pversion="$VERSION" -Dfile.encoding=UTF-8 -Dhttps.protocols=TLSv1.2 -xtest -xjavadoc assemble publishMavenPublicationToXpdustryRepository |