-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
2 changed files
with
58 additions
and
6 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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
name: CI | ||
on: | ||
push: | ||
branches: [ dev ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
@@ -9,13 +10,16 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Get latest release version | ||
id: latest-release | ||
uses: fangqiuming/[email protected] | ||
|
||
- name: Replace version | ||
run: | | ||
sed -i "s/_VERSION_/$(git rev-parse --short "$GITHUB_SHA")/g" pack.toml | ||
echo "VERSION=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV" | ||
sed -i "s/_VERSION_/0.0.0/g" config/fabric_loader_dependencies.json | ||
find config -type f -exec sed -i "s/_VERSION_/$(git rev-parse --short "$GITHUB_SHA")/g" {} + | ||
find config -type f -exec sed -i "s/_COMMIT_/${{ github.sha }}/g" {} + | ||
echo "VERSION=${{ steps.latest-release.outputs.tag_name }}-$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV" | ||
sed -i "s/_VERSION_/${{ steps.latest-release.outputs.tag_name }}/g" config/fabric_loader_dependencies.json | ||
find . -type f -exec sed -i "s/_VERSION_/${{ steps.latest-release.outputs.tag_name }}-$(git rev-parse --short "$GITHUB_SHA")/g" {} + | ||
find . -type f -exec sed -i "s/_COMMIT_/${{ github.sha }}/g" {} + | ||
- name: Install Packwiz | ||
run: | | ||
|
@@ -83,4 +87,4 @@ jobs: | |
java -jar cmcl.jar config printStartupInfo true | ||
java -jar cmcl.jar config checkAccountBeforeStart false | ||
echo "0" | java -jar cmcl.jar CI | ||
if [ `grep -c "java.lang.IllegalStateException: Failed to initialize GLFW, errors: GLFW error during init: [0x1000E]Failed to detect any supported platform" .minecraft/versions/CI/latest.log` -ne "0" ]; then echo "::error title=Game crashed::Oops." && exit 1; fi | ||
if [ `grep -c "java.lang.IllegalStateException: Failed to initialize GLFW, errors: GLFW error during init: [0x1000E]Failed to detect any supported platform" .minecraft/versions/CI/logs/latest.log` -ne "1" ]; then echo "::error title=Game crashed::Oops." && exit 1; fi |
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,48 @@ | ||
name: Release | ||
on: | ||
release: | ||
types: [published] | ||
jobs: | ||
curseforge: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download pack files | ||
uses: robinraju/[email protected] | ||
id: download-files | ||
with: | ||
fileName: "*.zip" | ||
latest: true | ||
tarBall: false | ||
zipBall: false | ||
preRelease: false | ||
- name: Publish to CurseForge | ||
uses: Kir-Antipov/[email protected] | ||
with: | ||
name: ${{ steps.download-files.outputs.tag_name }} | ||
curseforge-id: 997983 | ||
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }} | ||
curseforge-files: '*.zip' | ||
loaders: fabric | ||
game-versions: ${{ vars.MC_VERSION }} | ||
modrinth: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download pack files | ||
uses: robinraju/[email protected] | ||
id: download-files | ||
with: | ||
fileName: "*.mrpack" | ||
latest: true | ||
tarBall: false | ||
zipBall: false | ||
preRelease: false | ||
- name: Publish to Modrinth | ||
uses: Kir-Antipov/[email protected] | ||
with: | ||
name: ${{ steps.download-files.outputs.tag_name }} | ||
modrinth-id: Ve6iGkhQ | ||
modrinth-token: ${{ secrets.MODRINTH_TOKEN }} | ||
modrinth-unfeature-mode: subset | ||
files: '*.mrpack' | ||
loaders: fabric | ||
game-versions: ${{ vars.MC_VERSION }} |