Skip to content

2.0.2

2.0.2 #2

Workflow file for this run

name: Publish to Foundry
on:
workflow_dispatch:
release:
types:
- released
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.4
- id: set_var
run: |
delimiter="$(openssl rand -hex 8)"
echo "moduleJson<<${delimiter}" >> "${GITHUB_OUTPUT}"
cat ./public/module.json >> ${GITHUB_OUTPUT}
echo "${delimiter}" >> "${GITHUB_OUTPUT}"
- name: Publish Module
run: |
curl https://api.foundryvtt.com/_api/packages/release_version/ \
-H "Content-Type: application/json" \
-H "Authorization: ${{ secrets.FVTT_TOKEN }}" \
--request POST \
--data '{"id": "${{steps.set_var.outputs.moduleJson && fromJson(steps.set_var.outputs.moduleJson).id}}","release":{"version":"${{github.event.release.tag_name}}","manifest":"${{github.server_url}}/${{github.repository}}/releases/download/${{github.event.release.tag_name}}/module.json","notes":"${{github.server_url}}/${{github.repository}}/releases/tag/${{github.event.release.tag_name}}","compatibility":${{steps.set_var.outputs.moduleJson && toJson(fromJson(steps.set_var.outputs.moduleJson).compatibility)}}}}'