Merge pull request #94 from dima-dencep/1.21.x/dev #86
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: 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/[email protected] | |
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/[email protected] | |
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/[email protected] | |
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 }} | |
dependencies: | | |
recs(optional){modrinth:VbyJLvvb}{curseforge:457570} | |
java: | | |
21 | |
- name: Publish Fabric to Modrinth & CurseForge | |
uses: Kir-Antipov/[email protected] | |
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 }} | |
dependencies: | | |
cloth-config | |
modmenu(optional) | |
java: | | |
21 | |
- name: Publish Fabric & Forge to Github | |
uses: Kir-Antipov/[email protected] | |
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 |