generated from jaredlll08/MultiLoader-Template
-
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.
Generate release tried-and-tested way. Upload Forge and Fabric independantly to Modrinth and CurseForge
- Loading branch information
Showing
2 changed files
with
89 additions
and
27 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,4 +1,4 @@ | ||
name: Publish on GitHub, CurseForge & Modrinth | ||
name: Publish prerelease on GitHub, CurseForge & Modrinth | ||
|
||
on: | ||
push: | ||
|
@@ -10,9 +10,8 @@ on: | |
env: | ||
MINECRAFT_VERSION: 1.19.2 | ||
JAVA_VERSION: 17 | ||
MODRINTH_TOKEN: ${{ secrets.PUBLISH_MODRINTH_TOKEN }} | ||
CURSEFORGE_TOKEN: ${{ secrets.PUBLISH_CURSEFORGE_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.PUBLISH_GITHUB_TOKEN }} | ||
GITLAB_URL: https://git.griefed.de | ||
GITLAB_PROJECT_ID: 119 | ||
|
||
permissions: | ||
contents: write | ||
|
@@ -36,10 +35,46 @@ jobs: | |
- name: Use tag | ||
run: echo ${{steps.tag.outputs.tag}} | ||
|
||
|
||
# GET RELEASE INFO | ||
- name: Get Release Info | ||
run: | | ||
curl --header \ | ||
'PRIVATE-TOKEN: ${{ secrets.GITLAB_TOKEN }}' \ | ||
'${{ env.GITLAB_URL }}/api/v4/projects/${{ env.GITLAB_PROJECT_ID }}/releases/${{ needs.preparations.outputs.version }}' >> version.json | ||
# GET DESCRIPTION | ||
- name: Extract version changelog | ||
uses: sergeysova/[email protected] | ||
id: description | ||
with: | ||
cmd: "jq .description version.json -r | sed -e 's/\\n/\\n/g' > description.txt" | ||
multiline: true | ||
|
||
- name: Dafuq # Otherwise we wouldn't be able to work with the file. Because reasons... | ||
run: sudo chown $USER description.txt | ||
|
||
- name: Create Release | ||
id: create_release | ||
uses: softprops/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
tag_name: ${{ needs.preparations.outputs.version }} | ||
name: Pre-Release ${{ needs.preparations.outputs.version }} | ||
body_path: description.txt | ||
draft: false | ||
prerelease: true | ||
|
||
build: | ||
needs: preparations | ||
strategy: | ||
matrix: | ||
include: | ||
- platform: forge | ||
name: Forge | ||
- platform: fabric | ||
name: Fabric | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check Environment Variables | ||
run: env | ||
|
@@ -56,35 +91,31 @@ jobs: | |
java-version: 17 | ||
|
||
- name: Make Gradle Wrapper Executable | ||
if: ${{ runner.os != 'Windows' }} | ||
run: chmod +x ./gradlew | ||
|
||
- name: Build | ||
run: ./gradlew -Pversion="${{ needs.preparations.outputs.version }}" clean blockAndItemCodeGen build | ||
|
||
- name: Publish (CurseForge/Modrinth/GitHub) | ||
uses: Kir-Antipov/mc-publish@v3.2 | ||
uses: Kir-Antipov/mc-publish@v3.3 | ||
with: | ||
loaders: | | ||
fabric | ||
forge | ||
${{ matrix.platform }} | ||
curseforge-id: 935081 | ||
curseforge-token: "${{ secrets.CURSEFORGE_TOKEN }}" | ||
|
||
modrinth-id: usDxEvVr | ||
modrinth-token: "${{ secrets.MODRINTH_TOKEN }}" | ||
modrinth-unfeature-mode: loader-any | ||
|
||
github-tag: "${{ needs.preparations.outputs.version }}" | ||
github-token: "${{ secrets.GITHUB_TOKEN }}" | ||
github-prerelease: true | ||
|
||
name: "AddEmAll ${{ needs.preparations.outputs.version }} for Minecraft 1.19.2" | ||
version: "${{ needs.preparations.outputs.version }}" | ||
changelog-file: CHANGELOG.md | ||
name: "AddEmAll ${{ matrix.name }} ${{ needs.preparations.outputs.version }} for Minecraft 1.19.2" | ||
|
||
game-versions: "${{ env.MINECRAFT_VERSION }}" | ||
java: "${{ env.JAVA_VERSION }}" | ||
|
||
files: | | ||
+(Forge|Fabric)/build/libs/*[0-9].jar | ||
${{ matrix.name }}/build/libs/*[0-9].jar |
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,4 +1,4 @@ | ||
name: Publish on GitHub, CurseForge & Modrinth | ||
name: Publish release on GitHub, CurseForge & Modrinth | ||
|
||
on: | ||
push: | ||
|
@@ -8,9 +8,8 @@ on: | |
env: | ||
MINECRAFT_VERSION: 1.19.2 | ||
JAVA_VERSION: 17 | ||
MODRINTH_TOKEN: ${{ secrets.PUBLISH_MODRINTH_TOKEN }} | ||
CURSEFORGE_TOKEN: ${{ secrets.PUBLISH_CURSEFORGE_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.PUBLISH_GITHUB_TOKEN }} | ||
GITLAB_URL: https://git.griefed.de | ||
GITLAB_PROJECT_ID: 119 | ||
|
||
permissions: | ||
contents: write | ||
|
@@ -34,10 +33,45 @@ jobs: | |
- name: Use tag | ||
run: echo ${{steps.tag.outputs.tag}} | ||
|
||
|
||
# GET RELEASE INFO | ||
- name: Get Release Info | ||
run: | | ||
curl --header \ | ||
'PRIVATE-TOKEN: ${{ secrets.GITLAB_TOKEN }}' \ | ||
'${{ env.GITLAB_URL }}/api/v4/projects/${{ env.GITLAB_PROJECT_ID }}/releases/${{ needs.preparations.outputs.version }}' >> version.json | ||
# GET DESCRIPTION | ||
- name: Extract version changelog | ||
uses: sergeysova/[email protected] | ||
id: description | ||
with: | ||
cmd: "jq .description version.json -r | sed -e 's/\\n/\\n/g' > description.txt" | ||
multiline: true | ||
|
||
- name: Dafuq # Otherwise we wouldn't be able to work with the file. Because reasons... | ||
run: sudo chown $USER description.txt | ||
|
||
- name: Create Release | ||
id: create_release | ||
uses: softprops/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
tag_name: ${{ needs.preparations.outputs.version }} | ||
name: Pre-Release ${{ needs.preparations.outputs.version }} | ||
body_path: description.txt | ||
draft: false | ||
|
||
build: | ||
needs: preparations | ||
strategy: | ||
matrix: | ||
include: | ||
- platform: forge | ||
name: Forge | ||
- platform: fabric | ||
name: Fabric | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check Environment Variables | ||
run: env | ||
|
@@ -54,34 +88,31 @@ jobs: | |
java-version: 17 | ||
|
||
- name: Make Gradle Wrapper Executable | ||
if: ${{ runner.os != 'Windows' }} | ||
run: chmod +x ./gradlew | ||
|
||
- name: Build | ||
run: ./gradlew -Pversion="${{ needs.preparations.outputs.version }}" clean blockAndItemCodeGen build | ||
|
||
- name: Publish (CurseForge/Modrinth/GitHub) | ||
uses: Kir-Antipov/mc-publish@v3.2 | ||
uses: Kir-Antipov/mc-publish@v3.3 | ||
with: | ||
loaders: | | ||
fabric | ||
forge | ||
${{ matrix.platform }} | ||
curseforge-id: 935081 | ||
curseforge-token: "${{ secrets.CURSEFORGE_TOKEN }}" | ||
|
||
modrinth-id: usDxEvVr | ||
modrinth-token: "${{ secrets.MODRINTH_TOKEN }}" | ||
modrinth-unfeature-mode: loader-any | ||
|
||
github-tag: "${{ needs.preparations.outputs.version }}" | ||
github-token: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
name: "AddEmAll ${{ needs.preparations.outputs.version }} for Minecraft 1.19.2" | ||
version: "${{ needs.preparations.outputs.version }}" | ||
changelog-file: CHANGELOG.md | ||
name: "AddEmAll ${{ matrix.name }} ${{ needs.preparations.outputs.version }} for Minecraft 1.19.2" | ||
|
||
game-versions: "${{ env.MINECRAFT_VERSION }}" | ||
java: "${{ env.JAVA_VERSION }}" | ||
|
||
files: | | ||
+(Forge|Fabric)/build/libs/*[0-9].jar | ||
${{ matrix.name }}/build/libs/*[0-9].jar |