-
Notifications
You must be signed in to change notification settings - Fork 0
CI CD Example
AzureDoom edited this page Aug 5, 2026
·
3 revisions
HytalePublisher supports environment variables for API keys, which makes it suitable for CI/CD workflows.
name: Publish Mod
on:
workflow_dispatch:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write # required for the github {} publish target to create releases/tags
env:
MODTALE_KEY: ${{ secrets.MODTALE_KEY }}
CURSE_KEY: ${{ secrets.CURSE_KEY }}
MODIFOLD_KEY: ${{ secrets.MODIFOLD_KEY }}
TCLI_AUTH_TOKEN: ${{ secrets.TCLI_AUTH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0 # ensures the full history/tags are available for the github {} target
- name: Set up Java
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 25
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v5
- name: Publish enabled platforms
run: |
chmod +x ./gradlew
ls -l ./gradlew
./gradlew publishAllOnly platforms with enabled = true will publish. Store API keys as repository or organization secrets.