Skip to content

0.0.16

0.0.16 #31

Workflow file for this run

name: Module Builder
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Zip Files
working-directory: ./
run: zip -r ./module.zip ./*
- name: Get Version
shell: bash
id: get-version
run: echo "version=$(node ./.github/workflows/get-version.js)" >> $GITHUB_OUTPUT
- name: Create Release
id: create-release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
name: Release ${{ steps.get-version.outputs.version }}
draft: false
prerelease: false
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: './module.zip, ./module.json'
tag: ${{ steps.get-version.outputs.version }}
- name: Release Foundry Package
run: |
API_TOKEN="${{ secrets.FOUNDRY_API_TOKEN }}"
PACKAGE_ID="gambits-premades"
PACKAGE_VERSION="${{ steps.get-version.outputs.version }}"
MANIFEST_URL="https://github.com/gambit07/gambits-premades/releases/latest/download/module.json"
RELEASE_NOTES_URL="https://github.com/gambit07/gambits-premades/releases/tag/${{ steps.get-version.outputs.version }}"
FOUNDRY_MIN_VERSION="11"
FOUNDRY_VERIFIED_VERSION="11"
FOUNDRY_MAX_VERSION="11"
curl -X POST "https://api.foundryvtt.com/_api/packages/release_version" \
-H "Content-Type: application/json" \
-H "Authorization: ${API_TOKEN}" \
-d '{
"id": "'"$PACKAGE_ID"'",
"release": {
"version": "'"$PACKAGE_VERSION"'",
"manifest": "'"$MANIFEST_URL"'",
"notes": "'"$RELEASE_NOTES_URL"'",
"compatibility": {
"minimum": "'"$FOUNDRY_MIN_VERSION"'",
"verified": "'"$FOUNDRY_VERIFIED_VERSION"'",
"maximum": "'"$FOUNDRY_MAX_VERSION"'"
}
}
}'