-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
111 additions
and
65 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,9 +4,6 @@ on: | |
push: | ||
branches: | ||
- main | ||
tags: | ||
- "v*" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
packsquash: | ||
|
@@ -54,65 +51,4 @@ jobs: | |
name: ${{ steps.info.outputs.name }} v${{ steps.info.outputs.version }} | ||
path: src/ | ||
|
||
- name: Make Optimized Pack | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
uses: ComunidadAylas/PackSquash-action@v4 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
options: packsquash.toml | ||
packsquash_version: latest | ||
|
||
- name: Rename Optimized Pack | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
run: mv ${{ steps.info.outputs.output }} "${{ steps.info.outputs.package }}.zip" | ||
|
||
- name: Publish | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
uses: Kir-Antipov/[email protected] | ||
with: | ||
modrinth-id: Srw5RQ6k | ||
modrinth-token: ${{ secrets.MODRINTH_TOKEN }} | ||
curseforge-id: 513425 | ||
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }} | ||
files-primary: ${{ steps.info.outputs.package }}.zip | ||
name: ${{ steps.info.outputs.name }} v${{ steps.info.outputs.version }} | ||
version: v${{ steps.info.outputs.version }} | ||
version-type: release | ||
changelog-file: CHANGELOG.md | ||
game-versions: | | ||
1.21 | ||
1.20.6 | ||
1.20.5 | ||
1.20.4 | ||
1.20.3 | ||
1.20.2 | ||
1.20.1 | ||
1.20 | ||
1.19.3 | ||
1.19.2 | ||
1.19.1 | ||
1.19 | ||
1.18.2 | ||
1.18.1 | ||
1.18 | ||
1.17.1 | ||
1.17 | ||
1.16.5 | ||
1.16.4 | ||
1.16.3 | ||
1.16.2 | ||
1.16.1 | ||
1.16 | ||
1.15.2 | ||
1.15.1 | ||
1.15 | ||
1.14.4 | ||
1.14.3 | ||
1.14.2 | ||
1.14.1 | ||
1.14 | ||
1.13.2 | ||
1.13.1 | ||
1.13 | ||
loaders: | | ||
minecraft | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
name: Build optimized resource pack | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
packsquash: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Download tombl | ||
uses: robinraju/[email protected] | ||
with: | ||
repository: snyball/tombl | ||
fileName: "*.tar.gz" | ||
latest: true | ||
|
||
- name: Install tombl | ||
run: | | ||
mkdir bin | ||
tar -zxvf tombl-*.tar.gz -C bin/ | ||
readonly tombl=$(find bin/ -type f -executable -print -quit) | ||
echo "$(dirname $tombl)" >> $GITHUB_PATH | ||
- name: Prepare environments | ||
id: info | ||
run: | | ||
eval "$(tombl -e name=name pack.toml)" | ||
echo "name=$name" >> $GITHUB_OUTPUT | ||
eval "$(tombl -e version=version pack.toml)" | ||
echo "version=$version" >> $GITHUB_OUTPUT | ||
sha=`echo $GITHUB_SHA | cut -c 1-7` | ||
echo "sha=$sha" >> $GITHUB_OUTPUT | ||
package=${name}-${version}-rev.${sha} | ||
echo "package=$package" >> $GITHUB_OUTPUT | ||
mkdir build | ||
eval "$(tombl -e output=output_file_path packsquash.toml)" | ||
echo "output=$output" >> $GITHUB_OUTPUT | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ steps.info.outputs.name }} v${{ steps.info.outputs.version }} | ||
path: src/ | ||
|
||
- name: Make Optimized Pack | ||
uses: ComunidadAylas/PackSquash-action@v4 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
options: packsquash.toml | ||
packsquash_version: latest | ||
|
||
- name: Rename Optimized Pack | ||
run: mv ${{ steps.info.outputs.output }} "${{ steps.info.outputs.package }}.zip" | ||
|
||
- name: Publish | ||
uses: Kir-Antipov/[email protected] | ||
with: | ||
modrinth-id: Srw5RQ6k | ||
modrinth-token: ${{ secrets.MODRINTH_TOKEN }} | ||
curseforge-id: 513425 | ||
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }} | ||
files-primary: ${{ steps.info.outputs.package }}.zip | ||
name: ${{ steps.info.outputs.name }} v${{ steps.info.outputs.version }} | ||
version: v${{ steps.info.outputs.version }} | ||
version-type: release | ||
changelog-file: CHANGELOG.md | ||
game-versions: | | ||
1.21 | ||
1.20.6 | ||
1.20.5 | ||
1.20.4 | ||
1.20.3 | ||
1.20.2 | ||
1.20.1 | ||
1.20 | ||
1.19.3 | ||
1.19.2 | ||
1.19.1 | ||
1.19 | ||
1.18.2 | ||
1.18.1 | ||
1.18 | ||
1.17.1 | ||
1.17 | ||
1.16.5 | ||
1.16.4 | ||
1.16.3 | ||
1.16.2 | ||
1.16.1 | ||
1.16 | ||
1.15.2 | ||
1.15.1 | ||
1.15 | ||
1.14.4 | ||
1.14.3 | ||
1.14.2 | ||
1.14.1 | ||
1.14 | ||
1.13.2 | ||
1.13.1 | ||
1.13 | ||
loaders: | | ||
minecraft |