Mint CI - 1_21_1 #1
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
### Author: Frish2021 ### | |
name: Mint CI - 1_21_1 | |
on: | |
workflow_dispatch: | |
inputs: | |
publish: | |
type: boolean | |
description: Publish API | |
default: false | |
build: | |
type: boolean | |
description: Build Server | |
default: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-java@v4.5.0 | |
with: | |
java-version: '21' | |
distribution: 'zulu' | |
architecture: x64 | |
- name: Config Git | |
run: | | |
git config --global user.email "CI@menthamc.com" | |
git config --global user.name "MenthaMC-CI" | |
- name: Preparation | |
run: | | |
chmod +x ./gradlew | |
./gradlew applyPatches | |
- name: Building Mint... | |
if: ${{ inputs.build }} | |
run: | | |
./gradlew createMojmapPaperclipJar | |
- name: Publishing Mint-api... | |
if: ${{ inputs.publish }} | |
run: | | |
./gradlew publish | |
env: | |
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} | |
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} | |
- name: Set Building environment | |
run: | | |
echo "commit_tag=$(git log --pretty='%h' -1)" >> $GITHUB_ENV | |
echo "commit_msg=$(git log --pretty='> [%h] %s' -1)" >> $GITHUB_ENV | |
echo "branch_name=$(git branch --show-current)" >> $GITHUB_ENV | |
- name: Upload artifacts | |
if: ${{ inputs.build }} | |
uses: softprops/action-gh-release@v2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
tag_name: ${{ env.commit_tag }} | |
name: 'Mint 1.21.1 - ${{ env.commit_tag }} - ${{ env.branch_name }}' | |
body: | | |
 | |
 | |
 | |
### Commit Message | |
${{ env.commit_msg }} | |
files: 'build/libs/*.jar' |