Skip to content

Publish

Publish #34

Workflow file for this run

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
cat ../xpdustry-helper/scripts/publish.gradle >> ./build.gradle
./gradlew -Pversion="$VERSION" -Dfile.encoding=UTF-8 -Dhttps.protocols=TLSv1.2 -xtest -xjavadoc assemble publishToMavenLocal publishMavenPublicationToXpdustryRepository
cd ../Mindustry
cat ../xpdustry-helper/scripts/publish.gradle >> ./build.gradle
sed -i "s/^archash=.*/archash=$VERSION/" ./gradle.properties
./gradlew -Pversion="$VERSION" -Dfile.encoding=UTF-8 -Dhttps.protocols=TLSv1.2 -xtest -xjavadoc assemble publishMavenPublicationToXpdustryRepository