Skip to content

Add MavenPublication for mod-snapshot #19

Add MavenPublication for mod-snapshot

Add MavenPublication for mod-snapshot #19

Workflow file for this run

name: Package Publishing
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
# 1.19.2
- minecraft-version: "1.19.2"
subproject: ":common"
- minecraft-version: "1.19.2"
subproject: ":fabric"
- minecraft-version: "1.19.2"
subproject: ":forge"
# 1.20
- minecraft-version: "1.20"
subproject: ":common"
- minecraft-version: "1.20"
subproject: ":fabric"
- minecraft-version: "1.20"
subproject: ":forge"
# 1.20.5
- minecraft-version: "1.20.5"
subproject: ":common"
- minecraft-version: "1.20.5"
subproject: ":fabric"
- minecraft-version: "1.20.5"
subproject: ":neoforge"
# 1.21
- minecraft-version: "1.21"
subproject: ":common"
- minecraft-version: "1.21"
subproject: ":fabric"
- minecraft-version: "1.21"
subproject: ":neoforge"
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Set up JDK 22
uses: actions/setup-java@v4
with:
java-version: '22'
distribution: 'temurin'
cache: 'gradle'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
- name: Grant execute permission for Gradlew
run: chmod +x ./gradlew
- name: Publish to GitHub Packages
run: ./gradlew -PminecraftVersion=${{ matrix.minecraft-version }} ${{ matrix.subproject }}:publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_BUILD_NUMBER: ${{ github.run_number }}