diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1ca6e20..8580c19 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -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: @@ -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 }}"