Skip to content

2.0.14

2.0.14 #38

Workflow file for this run

name: Module Builder
on:
push:
branches:
- main
paths-ignore:
- 'README.md'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout & enable pushing
uses: actions/checkout@v4
with:
persist-credentials: true
- name: Zip Files
run: zip -r module.zip ./*
- name: Release Foundry Package
env:
FOUNDRY_API_TOKEN: ${{ secrets.FOUNDRY_API_TOKEN }}
run: |
VERSION=$(node -p "require('./module.json').version")
curl -X POST "https://api.foundryvtt.com/_api/packages/release_version" \
-H "Content-Type: application/json" \
-H "Authorization: $FOUNDRY_API_TOKEN" \
-d '{
"id": "gambitsTemplatePreviewer",
"release": {
"version": "'"${VERSION}"'",
"manifest": "https://github.com/gambit07/gambitsTemplatePreviewer/releases/latest/download/module.json",
"download": "https://github.com/gambit07/gambitsTemplatePreviewer/releases/download/'"${VERSION}"'/module.zip",
"notes": "https://github.com/gambit07/gambitsTemplatePreviewer/releases/tag/'"${VERSION}"'",
"compatibility": {
"minimum": "12.328",
"verified": "13.345",
"maximum": "13.999"
}
}
}'
- name: Post to GTP Discord
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_GTP_WEBHOOK }}
run: |
VERSION=$(node -p "require('./module.json').version")
RELEASE_NOTES=$(sed ':a;N;$!ba;s/\n/\\n/g' release_notes.txt)
curl -H "Content-Type: application/json" \
-d '{
"embeds": [{
"title": "Gambit'\''s Template Previewer Release: '$VERSION'",
"description": "**To support my continued work on this module!**\n[Patreon ❤️](https://www.patreon.com/GambitsLounge) | [Ko-fi ❤️](https://ko-fi.com/gambit07)\n\n'"$RELEASE_NOTES"'\n\nCheck it out through the Foundry package manager or the link below:\n<https://github.com/gambit07/gambitsTemplatePreviewer/releases/tag/'"$VERSION"'>",
"image": {
"url": "https://avatars.githubusercontent.com/u/4236874?s=400&u=05d3718580ef87ea13467131a0c1fcaf4956630d&v=4"
}
}]
}' $DISCORD_WEBHOOK