Skip to content

Commit

Permalink
Add publish step to trigger website update
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander01998 committed Nov 20, 2024
1 parent 6f7f832 commit 475c392
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ on:
required: true
type: boolean
default: true
update_website:
description: "Update WurstClient.net post (only works if there already is one)"
required: true
type: boolean
default: false

jobs:
publish:
Expand Down Expand Up @@ -68,3 +73,18 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.OLD_MCX_PUBLISH_TOKEN }}
run: ./gradlew github --stacktrace

- name: Trigger website update
if: ${{ inputs.update_website }}
env:
GH_TOKEN: ${{ secrets.WURSTCLIENT_NET_PUBLISH_TOKEN }}
run: |
MOD_VERSION=$(grep "mod_version" gradle.properties | cut -d'=' -f2 | tr -d ' ')
WURST_VERSION=$(echo $MOD_VERSION | sed 's/^v//' | sed 's/-MC.*$//')
MC_VERSION=$(grep "minecraft_version" gradle.properties | cut -d'=' -f2 | tr -d ' ')
FAPI_VERSION=$(grep "fabric_version" gradle.properties | cut -d'=' -f2 | tr -d ' ')
gh workflow run add_wurst_port.yml \
-R Wurst-Imperium/WurstClient.net \
-f wurst_version="$WURST_VERSION" \
-f mc_version="$MC_VERSION" \
-f fapi_version="$FAPI_VERSION"

0 comments on commit 475c392

Please sign in to comment.