Publish #154
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: | |
mod_version: | |
description: 'Mod Version' | |
default: '1.20.0' | |
required: true | |
env: | |
MOD_VERSION: ${{ inputs.mod_version }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: 'gradle' | |
- name: crowdin action | |
uses: crowdin/github-action@v2 | |
with: | |
push_sources: false | |
upload_sources: false | |
push_translations: false | |
upload_translations: false | |
download_translations: false | |
create_pull_request: false | |
download_bundle: 4 | |
env: | |
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} | |
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} | |
- name: Set mod_version | |
run: sed -i -E "s/(mod_version\s*=\s*).+/\1${{ env.MOD_VERSION }}/" gradle.properties | |
- name: Build with Gradle | |
run: ./gradlew build | |
- name: Tag release on GitHub | |
uses: Kir-Antipov/mc-publish@v3 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
files: LICENSE | |
name: 1.12.2-${{ env.MOD_VERSION }} | |
version: 1.12.2-${{ env.MOD_VERSION }} | |
github-tag: 1.12.2-${{ env.MOD_VERSION }} | |
github-commitish: ${{ github.sha }} | |
github-generate-changelog: true | |
- name: Publish Forge build to CurseForge and Modrinth | |
uses: Kir-Antipov/mc-publish@v3 | |
with: | |
modrinth-id: MCF15nCy | |
modrinth-token: ${{ secrets.MODRINTH_TOKEN }} | |
curseforge-id: 1033985 | |
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }} | |
files: | | |
build/libs/*-${{ env.MOD_VERSION }}.jar | |
name: Forge-1.12.2-${{ env.MOD_VERSION }} | |
version: Forge-1.12.2-${{ env.MOD_VERSION }} | |
changelog: | | |
Full changelog can be found on [GitHub](https://github.com/ThexXTURBOXx/Balkons-WeaponMod-Legacy/releases) | |
loaders: forge | |
game-versions: 1.12.2 | |
java: 8 |