Skip to content

Update LICENSE

Update LICENSE #3

name: Build and Deploy
on:
push:
branches:
- '*/main'
jobs:
build-and-deploy:
env:
BRANCH_PREFIX: $(cat gradle.properties | grep mod_version | cut -d'+' -f2)
strategy:
matrix:
java: [
17,
]
runs-on: ubuntu-latest
steps:
- name: check environment variables
run: env
- name: checkout repository
uses: actions/checkout@v3
- name: validate gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: setup jdk ${{ matrix.java }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: 'microsoft'
- name: make gradle wrapper executable
run: chmod +x ./gradlew
- name: build
if: github.ref == 'refs/heads/${{ env.BRANCH_PREFIX }}/main'
run: ./gradlew build
- name: capture build artifacts
if: |
${{ matrix.java == '17' }}
github.ref == 'refs/heads/${{ env.BRANCH_PREFIX }}/main'
uses: actions/upload-artifact@v3
with:
name: Artifacts
path: build/libs/
- name: get mod version
if: github.ref == 'refs/heads/${{ env.BRANCH_PREFIX }}/main'
id: mod_version
run: |
mod_version_val=$(grep "mod_version" gradle.properties | cut -d'=' -f2 | tr -d '\n')
echo "mod_version=$mod_version_val" >> $GITHUB_OUTPUT
- name: get minecraft version
if: github.ref == 'refs/heads/${{ env.BRANCH_PREFIX }}/main'
id: minecraft_version
run: |
minecraft_version_val=$(grep "mod_version" gradle.properties | cut -d'+' -f2 | tr -d '\n')
echo "minecraft_version=$minecraft_version_val" >> $GITHUB_OUTPUT
- name: deploy with mc-publish
if: github.ref == 'refs/heads/${{ env.BRANCH_PREFIX }}/main'
uses: Kir-Antipov/[email protected]
with:
curseforge-id: 409221
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}
curseforge-dependencies: |
[email protected]+1.19.2(required){modrinth:P7dR8mSH}{curseforge:306612}#(ignore:github)
[email protected]+1.19.2(required){modrinth:wFyCClLQ}{curseforge:514734}#(ignore:github)
[email protected](required){modrinth:9s6osm5g}{curseforge:348521}#(ignore:github)
[email protected]+1.19-fabric(embedded){modrinth:AOyJhFvl}{curseforge:643780}#(ignore:github)
[email protected](embedded){modrinth:K01OU20C}{curseforge:318449}#(ignore:github)
modrinth-id: o5GUN4b1
modrinth-token: "${{ secrets.MODRINTH_TOKEN }}"
modrinth-dependencies: |
[email protected]+1.19.2(required){modrinth:P7dR8mSH}{curseforge:306612}#(ignore:github)
[email protected]+1.19.2(required){modrinth:wFyCClLQ}{curseforge:514734}#(ignore:github)
[email protected](required){modrinth:9s6osm5g}{curseforge:348521}#(ignore:github)
[email protected]+1.19-fabric(embedded){modrinth:AOyJhFvl}{curseforge:643780}#(ignore:github)
[email protected](embedded){modrinth:K01OU20C}{curseforge:318449}#(ignore:github)
[email protected](embedded){modrinth:kD9Vl1lR}#(ignore:curseforge)#(ignore:github)
# Modrinth has issues accepting javadocs right now
github-tag: "${{ steps.mod_version.outputs.mod_version }}"
github-token: ${{ secrets.REPOSITORY_TOKEN }}
github-commitish: ${{ steps.minecraft_version.outputs.minecraft_version }}/main
version: "${{ steps.mod_version.outputs.mod_version }}"
version-type: release
changelog-file: CHANGELOG.md
loaders: fabric
game-versions: "${{ steps.minecraft_version.outputs.minecraft_version }}"
java: "${{ matrix.java }}"