Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 0 additions & 2 deletions .github/FUNDING.yml

This file was deleted.

77 changes: 20 additions & 57 deletions .github/workflows/beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
env:
JAVA_VERSION: '21'
MODRINTH_PROJECT: 2m9WfquA
MOD_ID: jsmacros
MOD_ID: jsmacrosce

permissions:
contents: write
Expand All @@ -24,6 +24,7 @@ jobs:
outputs:
mod_version: ${{ steps.versions.outputs.mod_version }}
mc_versions: ${{ steps.versions.outputs.mc_versions }}
mc_versions_list: ${{ steps.versions.outputs.mc_versions_list }}
gradle_args: ${{ steps.versions.outputs.gradle_args }}
steps:
- name: Checkout
Expand All @@ -38,6 +39,8 @@ jobs:

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5
with:
cache-overwrite-existing: true

- name: Compute versions
id: versions
Expand All @@ -49,68 +52,28 @@ jobs:
fi
MOD_VERSION=$(./gradlew -q printVersion $ARGS | tail -1 | tr -d '\n\r')
MC_VERSIONS=$(./gradlew -q printMinecraftVersion $ARGS | tail -1 | tr -d '\n\r')
echo "gradle_args=$ARGS" >> "$GITHUB_OUTPUT"
echo "mod_version=${MOD_VERSION}" >> "$GITHUB_OUTPUT"
echo "mc_versions=${MC_VERSIONS}" >> "$GITHUB_OUTPUT"
MC_VERSIONS_LIST=$(printf '%s' "${MC_VERSIONS}" | tr ',' '\n')
DELIM="EOF_MC_VERSIONS"
{
echo "gradle_args=$ARGS"
echo "mod_version=${MOD_VERSION}"
echo "mc_versions=${MC_VERSIONS}"
echo "mc_versions_list<<${DELIM}"
echo "${MC_VERSIONS_LIST}"
echo "${DELIM}"
} >> "$GITHUB_OUTPUT"

- name: Build distribution
run: ./gradlew createDist ${{ steps.versions.outputs.gradle_args }}

- name: Publish to Modrinth and GitHub
run: ./gradlew publishMods ${{ steps.versions.outputs.gradle_args }}
env:
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload dist
uses: actions/upload-artifact@v4
with:
name: beta-dist-${{ steps.versions.outputs.mod_version }}
path: dist/**/*

publish:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download dist
uses: actions/download-artifact@v4
with:
name: beta-dist-${{ needs.build.outputs.mod_version }}
path: dist

- name: List dist contents
run: ls -R dist

- name: Create GitHub prerelease and upload artifacts
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ needs.build.outputs.mod_version }}-beta-${{ github.event.inputs.beta_number }}
name: JsMacros ${{ needs.build.outputs.mod_version }} (beta)
body: |
Beta build #${{ github.event.inputs.beta_number }} for JsMacros ${{ needs.build.outputs.mod_version }}.
Built game versions: ${{ needs.build.outputs.mc_versions }}
files: |
dist/jsmacros-*-fabric-${{ needs.build.outputs.mod_version }}.jar
dist/jsmacros-*-neoforge-${{ needs.build.outputs.mod_version }}.jar
dist/jsmacros-devkit-*-${{ needs.build.outputs.mod_version }}.zip
dist/jsmacros-extensions-*-${{ needs.build.outputs.mod_version }}.zip
dist/extensions/jsmacros-ext-*-${{ needs.build.outputs.mod_version }}.jar
dist/*-source.zip
fail_on_unmatched_files: false
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish to Modrinth
uses: Kir-Antipov/mc-publish@v3.3
with:
modrinth-id: ${{ env.MODRINTH_PROJECT }}
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
files: |
dist/jsmacros-*-fabric-${{ needs.build.outputs.mod_version }}.jar
dist/jsmacros-*-neoforge-${{ needs.build.outputs.mod_version }}.jar
name: JsMacros ${{ needs.build.outputs.mod_version }} (beta)
version: ${{ needs.build.outputs.mod_version }}-beta-${{ github.event.inputs.beta_number }}
version-type: beta
changelog: |
Beta build #${{ github.event.inputs.beta_number }} for JsMacros ${{ needs.build.outputs.mod_version }}.
Built game versions: ${{ needs.build.outputs.mc_versions }}
loaders: |
fabric
neoforge
game-versions: ${{ needs.build.outputs.mc_versions }}
java: 21
34 changes: 7 additions & 27 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ permissions:
env:
JAVA_VERSION: '21'
MODRINTH_PROJECT: 2m9WfquA
MOD_ID: jsmacros
MOD_ID: jsmacrosce

jobs:
build:
Expand All @@ -32,6 +32,8 @@ jobs:

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5
with:
cache-overwrite-existing: true

- name: Compute versions
id: versions
Expand All @@ -42,37 +44,15 @@ jobs:
echo "mod_version=${MOD_VERSION}" >> "$GITHUB_OUTPUT"
echo "short_sha=${SHORT_SHA}" >> "$GITHUB_OUTPUT"

- name: Build distribution
- name: Publish to GitHub
run: |
SHORT_SHA=${GITHUB_SHA::7}
./gradlew createDist -Pchannel=dev -Pbuild_sha=${SHORT_SHA}
./gradlew publishMods -Pchannel=dev -Pbuild_sha=${SHORT_SHA}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload dist
uses: actions/upload-artifact@v4
with:
name: dev-dist-${{ steps.versions.outputs.mod_version }}
path: dist/**/*

- name: Publish GitHub prerelease
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ steps.versions.outputs.mod_version }}
name: Dev ${{ steps.versions.outputs.mod_version }}
body: |
Dev build for commit ${{ github.sha }}.

Alpha, beta, and release builds are available on Modrinth: https://modrinth.com/mod/easts-jsmacros/versions
prerelease: true
generate_release_notes: false
files: |
dist/jsmacros-*-fabric-${{ steps.versions.outputs.mod_version }}.jar
dist/jsmacros-*-neoforge-${{ steps.versions.outputs.mod_version }}.jar
dist/jsmacros-devkit-*-${{ steps.versions.outputs.mod_version }}.zip
dist/jsmacros-extensions-*-${{ steps.versions.outputs.mod_version }}.zip
dist/extensions/jsmacros-ext-*-${{ steps.versions.outputs.mod_version }}.jar
dist/*-source.zip
fail_on_unmatched_files: false
token: ${{ secrets.GITHUB_TOKEN }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REF: refs/tags/v${{ steps.versions.outputs.mod_version }}
76 changes: 20 additions & 56 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
env:
JAVA_VERSION: '21'
MODRINTH_PROJECT: 2m9WfquA
MOD_ID: jsmacros
MOD_ID: jsmacrosce

permissions:
contents: write
Expand All @@ -21,6 +21,7 @@ jobs:
outputs:
mod_version: ${{ steps.versions.outputs.mod_version }}
mc_versions: ${{ steps.versions.outputs.mc_versions }}
mc_versions_list: ${{ steps.versions.outputs.mc_versions_list }}
gradle_args: ${{ steps.versions.outputs.gradle_args }}
steps:
- name: Checkout
Expand All @@ -35,6 +36,8 @@ jobs:

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5
with:
cache-overwrite-existing: true

- name: Compute versions
id: versions
Expand All @@ -46,67 +49,28 @@ jobs:
fi
MOD_VERSION=$(./gradlew -q printVersion $ARGS | tail -1 | tr -d '\n\r')
MC_VERSIONS=$(./gradlew -q printMinecraftVersion $ARGS | tail -1 | tr -d '\n\r')
echo "gradle_args=$ARGS" >> "$GITHUB_OUTPUT"
echo "mod_version=${MOD_VERSION}" >> "$GITHUB_OUTPUT"
echo "mc_versions=${MC_VERSIONS}" >> "$GITHUB_OUTPUT"
MC_VERSIONS_LIST=$(printf '%s' "${MC_VERSIONS}" | tr ',' '\n')
DELIM="EOF_MC_VERSIONS"
{
echo "gradle_args=$ARGS"
echo "mod_version=${MOD_VERSION}"
echo "mc_versions=${MC_VERSIONS}"
echo "mc_versions_list<<${DELIM}"
echo "${MC_VERSIONS_LIST}"
echo "${DELIM}"
} >> "$GITHUB_OUTPUT"

- name: Build distribution
run: ./gradlew createDist ${{ steps.versions.outputs.gradle_args }}

- name: Publish to Modrinth and GitHub
run: ./gradlew publishMods ${{ steps.versions.outputs.gradle_args }}
env:
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload dist
uses: actions/upload-artifact@v4
with:
name: release-dist-${{ steps.versions.outputs.mod_version }}
path: dist/**/*

publish:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download dist
uses: actions/download-artifact@v4
with:
name: release-dist-${{ needs.build.outputs.mod_version }}
path: dist

- name: List dist contents
run: ls -R dist

- name: Create GitHub release and upload artifacts
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ needs.build.outputs.mod_version }}
name: JsMacros ${{ needs.build.outputs.mod_version }}
body: |
Release for JsMacros ${{ needs.build.outputs.mod_version }}.
Built game versions: ${{ needs.build.outputs.mc_versions }}
files: |
dist/jsmacros-*-fabric-${{ needs.build.outputs.mod_version }}.jar
dist/jsmacros-*-neoforge-${{ needs.build.outputs.mod_version }}.jar
dist/jsmacros-devkit-*-${{ needs.build.outputs.mod_version }}.zip
dist/jsmacros-extensions-*-${{ needs.build.outputs.mod_version }}.zip
dist/extensions/jsmacros-ext-*-${{ needs.build.outputs.mod_version }}.jar
dist/*-source.zip
fail_on_unmatched_files: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish to Modrinth
uses: Kir-Antipov/mc-publish@v3.3
with:
modrinth-id: ${{ env.MODRINTH_PROJECT }}
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
files: |
dist/jsmacros-*-fabric-${{ needs.build.outputs.mod_version }}.jar
dist/jsmacros-*-neoforge-${{ needs.build.outputs.mod_version }}.jar
name: JsMacros ${{ needs.build.outputs.mod_version }}
version: ${{ needs.build.outputs.mod_version }}
version-type: release
changelog: |
Release for JsMacros ${{ needs.build.outputs.mod_version }}.
Built game versions: ${{ needs.build.outputs.mc_versions }}
loaders: |
fabric
neoforge
game-versions: ${{ needs.build.outputs.mc_versions }}
java: 21
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,7 @@ doc/
docs/web/[0-9]*

/META-INF/

# Affinity Photo
*.af~lock~
*.af~lock~:com.dropbox.ignored
Loading