v1.18.2-3.0.2 #68
Workflow file for this run
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: Build and upload mod | |
on: | |
release: | |
types: [ published ] | |
branches: [ forge-1.18 ] | |
jobs: | |
path: | |
name: Generate file path | |
runs-on: ubuntu-latest | |
outputs: | |
file_path: ${{steps.file.outputs.file_path}} | |
steps: | |
- name: Generate file path | |
id: file | |
run: echo "file_path=./build/libs/multiverse-$(echo ${{github.event.release.tag_name}} | cut -dv -f2).jar" >> $GITHUB_OUTPUT | |
build: | |
name: Build and cache | |
runs-on: ubuntu-latest | |
needs: [ path ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'adopt' | |
cache: 'gradle' | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Generate data | |
run: ./gradlew :runData | |
- name: Build | |
run: ./gradlew :build | |
- name: Cache | |
uses: actions/cache@v4 | |
with: | |
path: ${{needs.path.outputs.file_path}} | |
key: ${{github.sha}} | |
release: | |
name: Upload to release | |
runs-on: ubuntu-latest | |
needs: [ path,build ] | |
steps: | |
- name: Restore cache | |
uses: actions/cache@v4 | |
with: | |
path: ${{needs.path.outputs.file_path}} | |
key: ${{github.sha}} | |
- name: Upload to release | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: ${{needs.path.outputs.file_path}} | |
curseforge: | |
name: Upload to CurseForge | |
runs-on: ubuntu-latest | |
needs: [ path,build ] | |
steps: | |
- name: Restore cache | |
uses: actions/cache@v4 | |
with: | |
path: ${{needs.path.outputs.file_path}} | |
key: ${{github.sha}} | |
- name: Upload to CurseForge | |
uses: itsmeow/curseforge-upload@v3.1.2 | |
with: | |
token: ${{secrets.curseforge_api}} | |
project_id: 561392 | |
game_endpoint: minecraft | |
file_path: ${{needs.path.outputs.file_path}} | |
changelog: ${{github.event.release.body}} | |
display_name: ${{github.event.release.name}} | |
release_type: release | |
game_versions: minecraft-1-18:1.18.2,java:Java 17,Forge |