This repository has been archived by the owner on Sep 28, 2023. It is now read-only.
ModMenu Config Menu Impl #12
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: CI Build | |
on: | |
push: | |
branches: | |
- '**/dev' | |
- 'dev' | |
- '**/stable' | |
- 'stable' | |
- '**/arch' | |
- 'arch' | |
workflow_dispatch: | |
jobs: | |
build: | |
strategy: | |
matrix: | |
java: [ 17 ] | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: checkout repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: setup jdk ${{ matrix.java }} | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' # See 'Supported distributions' for available options | |
java-version: ${{ matrix.java }} | |
- name: Get short commit sha | |
id: get_short_sha | |
run: | | |
short_sha=$(echo ${GITHUB_SHA} | cut -c1-7) | |
echo "short_sha=$short_sha" >> $GITHUB_OUTPUT | |
- name: Read Properties mod info | |
id: mod_info | |
uses: christian-draeger/read-properties@1.1.1 | |
with: | |
path: gradle.properties | |
properties: "mod_name mod_version minecraft_version" | |
- name: make gradle wrapper executable | |
run: chmod +x ./gradlew | |
- name: build | |
run: ./gradlew CovertBuilds --stacktrace --no-daemon # also can use 'build' task | |
- name: capture build artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Build Artifacts | |
path: build/libs/ | |
- name: capture dev artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Dev Artifacts | |
path: build/devlibs/ | |
- name: capture mergeJars artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Merged Artifacts | |
path: build/Merged/ | |
- name: Publish to Github | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
build/libs/*-fabric.jar | |
build/libs/*-forge.jar | |
build/libs/Merged/*.jar | |
name: "${{ steps.mod_info.outputs.mod_name }} ${{ steps.mod_info.outputs.mod_version }}-mc${{ steps.mod_info.outputs.minecraft_version }} build${{ github.run_number }}" | |
tag_name: ${{ steps.mod_info.outputs.mod_version }}-mc${{ steps.mod_info.outputs.minecraft_version }}-${{ steps.get_short_sha.outputs.short_sha }} | |
target_commitish: ${{ github.event.ref }} | |
generate_release_notes: true | |
prerelease: true | |
token: ${{ secrets.RELEASE_TOKEN }} | |