Skip to content

Block, Forge, and Fabric just works i guess #2

Block, Forge, and Fabric just works i guess

Block, Forge, and Fabric just works i guess #2

Workflow file for this run

name: Build CI
on:
push:
branches:
- '**'
workflow_dispatch:
pull_request:
branches:
- '**'
jobs:
build:
strategy:
matrix:
java: [17]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: checkout repository
uses: actions/checkout@v4
- name: validate gradle wrapper
uses: gradle/wrapper-validation-action@v2
- name: setup jdk ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'zulu'
- name: make gradle wrapper executable
run: chmod +x ./gradlew
- name: build
run: ./gradlew clean build --stacktrace --no-daemon
- name: capture build artifacts
uses: actions/upload-artifact@v4
with:
name: Artifacts
path: |
fabric/build/libs
forge/build/libs
- name: get short sha
run: echo "SHORT_SHA=${GITHUB_SHA::7}" >> $GITHUB_ENV
- name: read gradle.properties
id: prop_info
uses: christian-draeger/read-properties@1.1.1
with:
path: gradle.properties
properties: "mod_version minecraft_version"
- name: create github release
if: github.repository_owner == 'erha134' && contains(github.event.head_commit.message, '[release]') == true
uses: softprops/action-gh-release@v2
with:
name: "${{ steps.prop_info.outputs.mod_version }} for mc${{ steps.prop_info.outputs.minecraft_version }}"
tag_name: "${{ steps.prop_info.outputs.minecraft_version }}-${{ steps.prop_info.outputs.mod_version }}"
files: |
fabric/build/libs/*.jar
forge/build/libs/*.jar
target_commitish: ${{ github.event.ref }}
generate_release_notes: true
token: ${{ secrets.RELEASE_TOKEN }}