Skip to content

Commit

Permalink
Add option for publish workflow to trigger the website update
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander01998 committed Dec 6, 2024
1 parent 6fb686f commit f078a56
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ on:
required: true
type: boolean
default: true
update_website:
description: "Update wimods.net post (only works if there already is one and publish_curseforge is true)"
required: false
type: boolean
default: false

jobs:
publish:
Expand Down Expand Up @@ -103,4 +108,18 @@ jobs:
if: ${{ inputs.publish_modrinth }}
run: ./gradlew publishModrinth --stacktrace

# TODO: Trigger website update
- name: Trigger website update
if: ${{ inputs.update_website && inputs.publish_curseforge }}
env:
GH_TOKEN: ${{ secrets.WIMODS_NET_PUBLISH_TOKEN }}
run: |
MOD_VERSION=$(grep "mod_version" gradle.properties | cut -d'=' -f2 | tr -d ' \r' | sed 's/-MC.*$//')
MC_VERSION=$(grep "minecraft_version" gradle.properties | cut -d'=' -f2 | tr -d ' \r')
FAPI_VERSION=$(grep "fabric_version" gradle.properties | cut -d'=' -f2 | tr -d ' \r')
gh workflow run add_mod_port.yml \
-R Wurst-Imperium/wimods.net \
-f mod="mo-glass" \
-f mod_version="$MOD_VERSION" \
-f mc_version="$MC_VERSION" \
-f fapi_version="$FAPI_VERSION" \
-f file_id="${{ steps.cf_file_id.outputs.file_id }}"

0 comments on commit f078a56

Please sign in to comment.