fix: remove creative tab sort order to hopefully fix tab weirdness on… #449
Workflow file for this run
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: Build and Publish | |
on: | |
push: | |
tags: | |
- 'alpha/v**' | |
- 'beta/v**' | |
- 'release/v**' | |
- 'test/v**' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up OpenJDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: temurin | |
- name: Get release type from github tag | |
id: get_release_type | |
uses: actions/github-script@v6 | |
with: | |
github-token: ${{ secrets.RELEASE_NOTES_TOKEN }} | |
result-encoding: string | |
script: | | |
return '${{ github.ref }}'.match(/refs\/tags\/(.*)\/v((.*)-(.*))/)[1]; | |
- name: Get file version from tag | |
id: get_version | |
uses: actions/github-script@v6 | |
with: | |
github-token: ${{ secrets.RELEASE_NOTES_TOKEN }} | |
result-encoding: string | |
script: | | |
return '${{ github.ref }}'.match(/refs\/tags\/(.*)\/v((.*)-(.*))/)[4]; | |
- name: Get main mc version from tag | |
id: get_mc_version | |
uses: actions/github-script@v6 | |
with: | |
github-token: ${{ secrets.RELEASE_NOTES_TOKEN }} | |
result-encoding: string | |
script: | | |
return '${{ github.ref }}'.match(/refs\/tags\/(.*)\/v((.*)-(.*))/)[3]; | |
- name: Build | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: build | |
gradle-home-cache-cleanup: true | |
env: | |
MOD_VERSION: ${{ steps.get_version.outputs.result }} | |
- name: Update CHANGELOG | |
id: changelog | |
uses: klikli-dev/changelog-action@main | |
with: | |
token: ${{ github.token }} | |
tag: ${{ github.ref_name }} | |
mcVersion: ${{ steps.get_mc_version.outputs.result }} | |
- name: Create Release | |
id: create_release | |
uses: ncipollo/release-action@v1 | |
with: | |
allowUpdates: true | |
draft: false | |
name: modonomicon-${{ steps.get_mc_version.outputs.result }}-${{ steps.get_version.outputs.result }}-${{ steps.get_release_type.outputs.result }} | |
body: ${{ steps.changelog.outputs.changes }} | |
token: ${{ github.token }} | |
tag: ${{ github.ref }} | |
artifacts: forge/build/libs/modonomicon-${{ steps.get_mc_version.outputs.result }}-forge-${{ steps.get_version.outputs.result }}.jar,forge/build/libs/modonomicon-${{ steps.get_mc_version.outputs.result }}-forge-${{ steps.get_version.outputs.result }}-slim.jar,forge/build/libs/modonomicon-${{ steps.get_mc_version.outputs.result }}-forge-${{ steps.get_version.outputs.result }}-sources.jar,fabric/build/libs/modonomicon-${{ steps.get_mc_version.outputs.result }}-fabric-${{ steps.get_version.outputs.result }}.jar,fabric/build/libs/modonomicon-${{ steps.get_mc_version.outputs.result }}-fabric-${{ steps.get_version.outputs.result }}-sources.jar,common/build/libs/modonomicon-${{ steps.get_mc_version.outputs.result }}-common-${{ steps.get_version.outputs.result }}.jar,common/build/libs/modonomicon-${{ steps.get_mc_version.outputs.result }}-common-${{ steps.get_version.outputs.result }}-sources.jar | |
artifactContentType: application/java-archive | |
- name: Commit CHANGELOG.md | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
if: ${{ steps.get_release_type.outputs.result != 'test' }} | |
with: | |
branch: version/1.20.1 | |
commit_message: 'docs: update CHANGELOG.md for ${{ github.ref_name }} [skip ci]' | |
file_pattern: CHANGELOG.md | |
- name: Upload Forge Version to Mod Platforms | |
uses: Kir-Antipov/[email protected] | |
if: ${{ steps.get_release_type.outputs.result != 'test' }} | |
with: | |
modrinth-id: 692GClaE | |
modrinth-token: ${{ secrets.MODRINTH_API_KEY }} | |
curseforge-id: 538392 | |
curseforge-token: ${{ secrets.CURSEFORGE_API_KEY }} | |
files: | | |
forge/build/libs/modonomicon-${{ steps.get_mc_version.outputs.result }}-forge-${{ steps.get_version.outputs.result }}.jar | |
forge/build/libs/modonomicon-${{ steps.get_mc_version.outputs.result }}-forge-${{ steps.get_version.outputs.result }}-sources.jar | |
name: modonomicon-${{ steps.get_mc_version.outputs.result }}-forge-${{ steps.get_version.outputs.result }}.jar | |
version: ${{ steps.get_mc_version.outputs.result }}-${{ steps.get_version.outputs.result }} | |
version-type: ${{ steps.get_release_type.outputs.result }} | |
loaders: | | |
forge | |
neoforge | |
game-versions: | | |
1.20 | |
${{ steps.get_mc_version.outputs.result }} | |
changelog: |- | |
${{ steps.changelog.outputs.changes }} | |
Find changes for all versions at https://github.com/klikli-dev/modonomicon/releases | |
dependencies: | | |
jei(optional) | |
- name: Upload Fabric Version to Mod Platforms | |
uses: Kir-Antipov/[email protected] | |
if: ${{ steps.get_release_type.outputs.result != 'test' }} | |
with: | |
modrinth-id: 692GClaE | |
modrinth-token: ${{ secrets.MODRINTH_API_KEY }} | |
curseforge-id: 538392 | |
curseforge-token: ${{ secrets.CURSEFORGE_API_KEY }} | |
files: | | |
fabric/build/libs/modonomicon-${{ steps.get_mc_version.outputs.result }}-fabric-${{ steps.get_version.outputs.result }}.jar | |
fabric/build/libs/modonomicon-${{ steps.get_mc_version.outputs.result }}-fabric-${{ steps.get_version.outputs.result }}-sources.jar | |
name: modonomicon-${{ steps.get_mc_version.outputs.result }}-fabric-${{ steps.get_version.outputs.result }}.jar | |
version: ${{ steps.get_mc_version.outputs.result }}-${{ steps.get_version.outputs.result }} | |
version-type: ${{ steps.get_release_type.outputs.result }} | |
game-versions: | | |
1.20 | |
${{ steps.get_mc_version.outputs.result }} | |
changelog: |- | |
${{ steps.changelog.outputs.changes }} | |
Find changes for all versions at https://github.com/klikli-dev/modonomicon/releases | |
dependencies: | | |
jei(optional) | |
# Publish at the end because it creates a non reobfed jarjar which otherwise would be distributed | |
- name: Publish | |
uses: gradle/gradle-build-action@v2 | |
if: ${{ steps.get_release_type.outputs.result != 'test' }} | |
with: | |
arguments: publish | |
gradle-home-cache-cleanup: true | |
env: | |
MAVEN_USER: ${{ secrets.MAVEN_USER }} | |
MAVEN_PASS: ${{ secrets.MAVEN_PASS }} | |
MOD_VERSION: ${{ steps.get_version.outputs.result }} |