Skip to content

Merge pull request #112 from dima-dencep/1.21.x/dev #94

Merge pull request #112 from dima-dencep/1.21.x/dev

Merge pull request #112 from dima-dencep/1.21.x/dev #94

Workflow file for this run

name: Publish Release
on:
push:
branches:
- '**/stable'
- '**/backport'
- '**/snapshot'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 21
- name: Grant execute permission for Gradlew
run: chmod +x gradlew
- name: Get previous tag
run: echo "previous_tag=$(git describe --tags --abbrev=0 2>/dev/null || echo '')" >> $GITHUB_ENV
- name: Build Changelog
id: build_changelog
uses: metcalfc/changelog-generator@v4.2.0
if: env.previous_tag
with:
myToken: ${{ secrets.GITHUB_TOKEN }}
base-ref: ${{ env.previous_tag }}
- name: Read value from Properties-file
id: read_property
uses: christian-draeger/read-properties@1.1.1
with:
path: './gradle.properties'
properties: 'mod_version minecraft_version'
- name: Upload assets to releases
run: ./gradlew build --no-daemon
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
- name: Publish Forge to Modrinth & CurseForge
uses: Kir-Antipov/mc-publish@v3.3.0
with:
modrinth-id: ZP7xHXtw
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
curseforge-id: 833233
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}
files: |
forge/build/libs/!(*-@(dev|sources|javadoc|shadow)).jar
name: "[NeoForge ${{ steps.read_property.outputs.minecraft_version }}] v${{ steps.read_property.outputs.mod_version }}"
changelog: ${{steps.build_changelog.outputs.changelog}}
version: "${{ steps.read_property.outputs.mod_version }}+mc${{ steps.read_property.outputs.minecraft_version }}-forge"
version-type: beta
loaders: |
neoforge
game-version-filter: none
game-versions: |
${{ steps.read_property.outputs.minecraft_version }}
1.21
java: |
21
- name: Publish Fabric to Modrinth & CurseForge
uses: Kir-Antipov/mc-publish@v3.3.0
with:
modrinth-id: ZP7xHXtw
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
curseforge-id: 833233
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}
files: |
fabric/build/libs/!(*-@(dev|sources|javadoc|shadow)).jar
name: "[Fabric ${{ steps.read_property.outputs.minecraft_version }}] v${{ steps.read_property.outputs.mod_version }}"
changelog: ${{steps.build_changelog.outputs.changelog}}
version: "${{ steps.read_property.outputs.mod_version }}+mc${{ steps.read_property.outputs.minecraft_version }}-fabric"
version-type: beta
loaders: |
fabric
game-version-filter: none
game-versions: |
${{ steps.read_property.outputs.minecraft_version }}
1.21
dependencies: |
cloth-config
java: |
21
- name: Publish Fabric & Forge to Github
uses: Kir-Antipov/mc-publish@v3.3.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
github-tag: "${{ steps.read_property.outputs.minecraft_version }}-${{ steps.read_property.outputs.mod_version }}"
files: |
forge/build/libs/!(*-@(dev|sources|javadoc|shadow)).jar
fabric/build/libs/!(*-@(dev|sources|javadoc|shadow)).jar
name: "[${{ steps.read_property.outputs.minecraft_version }}] v${{ steps.read_property.outputs.mod_version }}"
changelog: ${{steps.build_changelog.outputs.changelog}}
version-type: release