Skip to content

Mint CI - 1_21_1 #1

Mint CI - 1_21_1

Mint CI - 1_21_1 #1

Workflow file for this run

### 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: |
![tag](https://img.shields.io/badge/commit-${{ env.commit_tag }}-blue?style=flat-square)
![version](https://img.shields.io/badge/version-1.21.1_R0.1_SNAPSHOT-light_green?style=flat-square)
![downloads](https://img.shields.io/github/downloads/MenthaMC/Mint/${{ env.commit_tag }}/total?style=flat-square)
### Commit Message
${{ env.commit_msg }}
files: 'build/libs/*.jar'