Skip to content

Commit

Permalink
Update Fabric API and IPN. Actions: Update upload artifact to v3
Browse files Browse the repository at this point in the history
  • Loading branch information
OoLunar committed Oct 22, 2023
1 parent fcda86d commit 28196fa
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 30 deletions.
4 changes: 2 additions & 2 deletions .github/scripts/process-commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ new_semver=""
current_semver="$(grep -Po 'version = "\K[^"]+' pack.toml)"
new_or_removed_files=($(git diff --name-only --diff-filter=AD HEAD~1 | grep -E 'mods|resourcepacks|shaderpacks'))
modified_files=($(git diff --name-only --diff-filter=M HEAD~1 | grep -E 'mods|resourcepacks|shaderpacks'))
if [ ! -z "${new_or_removed_files[@]}" ]; then
if [ "${#new_or_removed_files[@]}" -gt 0 ]; then
# Bump the semver minor version up by one and reset the patch version to zero
new_semver="$(echo $current_semver | awk -F. -v OFS=. '{$(NF-1)++; $NF=0; print}')"
# Else if any mods, resourcepacks or shaderpacks were modified, bump the patch version up by one
elif [ ! -z "${modified_files[@]}" ]; then
elif [ "${#modified_files[@]}" -gt 0 ]; then
# Bump the semver patch version up by one
new_semver="$(echo $current_semver | awk -F. -v OFS=. '{$NF++; print}')"
fi
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
name: Test Commit
name: Process Commit

on:
push:
branches: ["main"]
paths-ignore: [".gitattributes", ".gitignore", "LICENSE"]

jobs:
process-commit:
name: Process Commit
runs-on: ubuntu-latest
if: "!contains(format('{0} {1}', github.event.head_commit.message, github.event.pull_request.title), '[ci-skip]')"
permissions:
contents: write
permissions: write-all
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -22,6 +19,8 @@ jobs:
- name: Process commit
run: ${{ github.workspace }}/.github/scripts/process-commit.sh
publish:
name: Publish
needs: process-commit
uses: ./.github/workflows/publish.yml
uses: ./.github/workflows/publish.yml
secrets:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
15 changes: 10 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,18 @@ on:
push:
tags: ['*']
workflow_call:
secrets:
MODRINTH_TOKEN:
description: 'The token to use for Modrinth authentication'
required: true
GITHUB_TOKEN:
description: 'The token to use for GitHub authentication'
required: true

jobs:
publish:
name: Publish Modpack
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -27,16 +32,16 @@ jobs:
- name: Build Modpack
run: ~/go/bin/packwiz modrinth export -o "Apollo-${{ steps.get_tag.outputs.tag }}.mrpack"
- name: Upload Artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: "Apollo-${{ steps.get_tag.outputs.tag }}.mrpack"
path: "Apollo-${{ steps.get_tag.outputs.tag }}.mrpack"
- uses: Kir-Antipov/[email protected]
with:
changelog: ${{ steps.changelog.outputs.text }}
files: "*.mrpack"
modrinth-id: CWFVvUtu
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
github-tag: ${{ steps.get_tag.outputs.tag }}
github-version-type: release
modrinth-id: CWFVvUtu
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
14 changes: 7 additions & 7 deletions index.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ hash = "6cf1b5501b2be7d5e02ee3c772693422555a3f4bf97ee253308ec9b2f3e97b2a"

[[files]]
file = ".github/scripts/process-commit.sh"
hash = "5b6c3498ce442c0baacbc70f5a1bee6f9862d226b72c6e6245420df5715e0a32"
hash = "76ec449f4a78b0bc0130919e7c393013fe5e64d76570c2935bb6b2da137e4a40"

[[files]]
file = ".github/workflows/publish.yml"
hash = "6b8cb9dce4669227ace7a13e428bbfb6377982ff10f17c0dd6ece07545372fb1"
file = ".github/workflows/process-commit.yml"
hash = "f931989182048c31b4c31ec7823ade1054aa1ce88823cb378a55cb480ce0ac1e"

[[files]]
file = ".github/workflows/test-commit.yml"
hash = "2198a4c45e85a33488fb967a4b5832829c2014616f8c6921a28448dc44cd4b71"
file = ".github/workflows/publish.yml"
hash = "1fdf46b59ad51e6cd85f8da317c9f51e930d3fa1a72e291f7ff86960ad611f9b"

[[files]]
file = "LICENSE"
Expand Down Expand Up @@ -147,7 +147,7 @@ metafile = true

[[files]]
file = "mods/fabric-api.pw.toml"
hash = "210a7ceddcaadd495e9c80a7bd30d2af6c1e8aefca0b0babb4023adef541008d"
hash = "4091b4282d862e53d617b33475ded505384e6475bd4c5c4ea1f15ccfcf978427"
metafile = true

[[files]]
Expand Down Expand Up @@ -177,7 +177,7 @@ metafile = true

[[files]]
file = "mods/inventory-profiles-next.pw.toml"
hash = "33c89073f71a972da05cfee8c8b00eec1549e406222b0abab659e38b42797820"
hash = "e9ea88e342b40c752d426175a969ee350f52b61d7437e0a398558dd3cca57a98"
metafile = true

[[files]]
Expand Down
8 changes: 4 additions & 4 deletions mods/fabric-api.pw.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name = "Fabric API"
filename = "fabric-api-0.90.0+1.20.1.jar"
filename = "fabric-api-0.90.4+1.20.1.jar"
side = "both"

[download]
url = "https://cdn.modrinth.com/data/P7dR8mSH/versions/tFw0iWAk/fabric-api-0.90.0%2B1.20.1.jar"
url = "https://cdn.modrinth.com/data/P7dR8mSH/versions/TpZ2i93f/fabric-api-0.90.4%2B1.20.1.jar"
hash-format = "sha1"
hash = "0d770660e6488f21c6e03426a509ced61c1c0519"
hash = "2a780521615c2d9fee783e04263a643f4beb2821"

[update]
[update.modrinth]
mod-id = "P7dR8mSH"
version = "tFw0iWAk"
version = "TpZ2i93f"
8 changes: 4 additions & 4 deletions mods/inventory-profiles-next.pw.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name = "Inventory Profiles Next"
filename = "InventoryProfilesNext-fabric-1.20-1.10.7.jar"
filename = "InventoryProfilesNext-fabric-1.20-1.10.8.jar"
side = "client"

[download]
url = "https://cdn.modrinth.com/data/O7RBXm3n/versions/OJWSzNQ9/InventoryProfilesNext-fabric-1.20-1.10.7.jar"
url = "https://cdn.modrinth.com/data/O7RBXm3n/versions/gSdwbAcI/InventoryProfilesNext-fabric-1.20-1.10.8.jar"
hash-format = "sha1"
hash = "bc82d5e44975e4ec6dac091409c55fde566c275a"
hash = "09632bc28e03b578cf0ff2b9334e75ce005e5ffe"

[update]
[update.modrinth]
mod-id = "O7RBXm3n"
version = "OJWSzNQ9"
version = "gSdwbAcI"
2 changes: 1 addition & 1 deletion pack.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pack-format = "packwiz:1.1.0"
[index]
file = "index.toml"
hash-format = "sha256"
hash = "8190b10d0898107e126cf9c96e873384fa0c5770007f7d83b920b03f9f240ab1"
hash = "b98a4709e152caccf0695e098d1382dc0c429283f017711fae69c40b855a8c18"

[versions]
fabric = "0.14.23"
Expand Down

0 comments on commit 28196fa

Please sign in to comment.