Skip to content

foundation#2: test test test #2

foundation#2: test test test

foundation#2: test test test #2

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
# TODO: rewrite it too
name: Build and Upload Test Artifact
on:
push:
paths:
- 'src/**'
- 'buildSrc/**'
- 'patches/**'
- 'build.gradle'
- 'gradle.properties'
- 'script/**'
- '.github/**'
pull_request:
workflow_dispatch:
inputs:
build_type:
type: choice
description: Build type
options:
- Stable
- Experimental
run-name: "${{ github.event_name == 'pull_request' && 'Pull Request Build, DO NOT DOWNLOAD' || format('{0}#{1}: {2}', github.ref_name, github.run_number, github.event.commits[0].message)}}"
permissions:
contents: read
jobs:
build:
name: Build and Upload Artifact
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.2.2
with:
fetch-tags: true
fetch-depth: 0
- name: Set up JDK 21
uses: actions/setup-java@v4.7.1
with:
java-version: '21'
distribution: 'temurin'
- name: Get branch name
id: branch-names
uses: tj-actions/branch-names@v9
- name: Fix Gradle permission
run: chmod +x ./gradlew
- name: Setup Forge env
run: ./gradlew setup -Prun_number=${{ github.run_number }}
- name: Stop Gradle daemon
run: ./gradlew --stop
- name: Build Jars
run: ./gradlew build -Prun_number=${{ github.run_number }}
- name: Get version
run: echo "CATROOM_VERSION=$(cat version.txt)" >> $GITHUB_ENV
- name: setup python
uses: actions/setup-python@v5.6.0
with:
python-version: '3.13'
- name: Generate MMC Pack
run: python main.py
working-directory: ./script/MMC-Builder
env:
PATH_TO_EXIST_INSTALLER: ../../projects/catroom/build/libs/catroom-${{ env.CATROOM_VERSION }}-installer.jar
BRANCH: ${{ steps.branch-names.outputs.current_branch }}
VERSION: ${{ env.CATROOM_VERSION }}
- name: Copy MMC Pack
run: cp script/MMC-Builder/build/CatRoom.zip ./projects/catroom/build/libs/CatRoom-MMC-instance-${{ env.CATROOM_VERSION }}.zip
- name: Upload Universal Jar
uses: actions/upload-artifact@v4.6.2
with:
name: universal-jar-${{ env.CATROOM_VERSION }}
path: projects/catroom/build/libs/*-universal.jar
- name: Upload Installer Jar
uses: actions/upload-artifact@v4.6.2
with:
name: installer-jar-${{ env.CATROOM_VERSION }}
path: projects/catroom/build/libs/*-installer.jar
if-no-files-found: error
# - name: Upload MMC pack zip
# uses: actions/upload-artifact@v4.6.2
# with:
# name: mmc-pack-zip-${{ env.CATROOM_VERSION }}
# path: projects/catroom/build/libs/*.zip