Skip to content

feat: add all crusher tiers as catalyst in jei #640

feat: add all crusher tiers as catalyst in jei

feat: add all crusher tiers as catalyst in jei #640

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: Log Version Info
env:
VERSION: ${{ steps.get_mc_version.outputs.result }}-${{ steps.get_version.outputs.result }}
run: echo "version = $VERSION"
- name: Build
uses: gradle/gradle-build-action@v2
with:
arguments: build
env:
VERSION: ${{ steps.get_mc_version.outputs.result }}-${{ 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: occultism-${{ 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: ./build/libs/occultism-${{ steps.get_mc_version.outputs.result }}-${{ steps.get_version.outputs.result }}.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.19.2
commit_message: 'docs: update CHANGELOG.md for ${{ github.ref_name }} [skip ci]'
file_pattern: CHANGELOG.md
- name: Upload to Curseforge
id: curseforge
uses: itsmeow/curseforge-upload@master
if: ${{ steps.get_release_type.outputs.result != 'test' }}
with:
token: ${{ secrets.CURSEFORGE_API_KEY }}
project_id: 361026
game_endpoint: minecraft
file_path: ./build/libs/occultism-${{ steps.get_mc_version.outputs.result }}-${{ steps.get_version.outputs.result }}.jar
changelog: |-
[Changelog]
${{ steps.changelog.outputs.changes }}
Find changes for all versions at https://github.com/klikli-dev/occultism/releases
game_versions: Forge,Minecraft 1.19:${{ steps.get_mc_version.outputs.result }}
display_name: occultism-${{ steps.get_mc_version.outputs.result }}-${{ steps.get_version.outputs.result }}.jar
release_type: ${{ steps.get_release_type.outputs.result }}
relations: modonomicon:requiredDependency,curios:requiredDependency,geckolib:requiredDependency,smartbrainlib:requiredDependency,theurgy:optionalDependency,jei:optionalDependency,almost-unified:optionalDependency,perviaminvenire:optionalDependency