Skip to content

Commit

Permalink
Add extract/build/release scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
ianblackstone committed Dec 11, 2024
1 parent 816fb1a commit e7c4037
Show file tree
Hide file tree
Showing 613 changed files with 53,802 additions and 400 deletions.
11 changes: 11 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.yml,*.json]
indent_size = 2
54 changes: 54 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Release Creation
on:
release:
types: [published]
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# get part of the tag after the `v`
- name: Extract tag version number
id: get-version
run: echo "version-without-v=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
- name: Get Module JSON
id: set_var
run: |
echo "PACKAGE_JSON=$(jq -c . < module.json)" >> $GITHUB_OUTPUT
- name: Get Module Title
id: title
run: echo "title=${{ fromJson(steps.set_var.outputs.PACKAGE_JSON).title }}" >> "$GITHUB_OUTPUT"
# Substitute the Manifest and Download URLs in the `module.json`.
- name: Substitute Manifest and Download Links For Versioned Ones
id: sub_manifest_link_version
uses: devops-actions/variable-substitution@v1.2
with:
files: module.json
env:
version: ${{ steps.get-version.outputs.version-without-v }}
manifest: https://github.com/${{ github.repository }}/releases/latest/download/module.json
download: https://github.com/${{ github.repository }}/releases/download/${{ github.event.release.tag_name }}/module.zip
# Create a folder containing all the module stuff and zip it for the release
- name: Create Zip
run: zip -r9 ./module.zip build/
- name: Update Release with Files
id: create_version_release
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.TOKEN }}
allowUpdates: true
omitDraftDuringUpdate: true
omitPrereleaseDuringUpdate: true
name: ${{ steps.get-version.outputs.version-without-v }}
body: ${{ steps.changelog.outputs.release-notes }}
artifacts: './module.json, ./module.zip'
- name: Publish to FoundryVTT
uses: cs96and/FoundryVTT-release-package@v1.0.2
if: ${{ !github.event.release.prerelease && env.PACKAGE_TOKEN }}
env:
PACKAGE_TOKEN: ${{ secrets.PACKAGE_TOKEN }}
with:
package-token: ${{ env.PACKAGE_TOKEN }}
manifest-url: https://github.com/${{ github.repository }}/releases/download/${{ github.event.release.tag_name }}/module.json
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
27 changes: 27 additions & 0 deletions build.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { compilePack } from "@foundryvtt/foundryvtt-cli";
import { existsSync } from "fs";
import fs from "fs/promises";
import path from "path";

// Clean output directory, or create build directory
const outDir = path.resolve(process.cwd(), "build");
if (existsSync(outDir)) {
const filesToClean = (await fs.readdir(outDir)).map((dirName) => path.resolve(outDir, dirName));
for (const file of filesToClean) {
await fs.rm(file, { recursive: true });
}
} else {
await fs.mkdir(outDir);
}

// Build packs
const packFolders = await fs.readdir("packs");
for (const pack of packFolders) {
await compilePack(`packs/${pack}`, path.resolve(outDir, `packs/${pack}`));
}

// Copy files and folders to output
const files = ["art", "scripts", "licenses", "module.json"];
for (const file of files) {
await fs.cp(file, path.resolve(outDir, file), { recursive: true });
}
Binary file added build/art/preview.webp
Binary file not shown.
402 changes: 201 additions & 201 deletions LICENSE → build/licenses/LICENSE

Large diffs are not rendered by default.

File renamed without changes.
118 changes: 59 additions & 59 deletions OpenGamingLicense.md → build/licenses/OpenGamingLicense.md

Large diffs are not rendered by default.

191 changes: 191 additions & 0 deletions build/module.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
{
"id": "pf2e-animal-companions",
"title": "PF2e Companion Compendia",
"description": "Compendia containing everything you need to support PF2e companions",
"url": "https://github.com/TikaelSol/PF2e-Animal-Companions",
"version": "6.3",
"packs": [
{
"label": "Animal Companion Ancestries",
"name": "AC-Ancestries-and-Class",
"path": "packs/ac-ancestries-and-class",
"banner": "systems/pf2e/assets/compendium-banner/red.webp",
"system": "pf2e",
"ownership": {
"PLAYER": "OBSERVER",
"ASSISTANT": "OWNER"
},
"type": "Item",
"flags": {}
},
{
"label": "Animal Companion Feats",
"name": "AC-Feats",
"path": "packs/ac-feats",
"banner": "systems/pf2e/assets/compendium-banner/red.webp",
"system": "pf2e",
"ownership": {
"PLAYER": "OBSERVER",
"ASSISTANT": "OWNER"
},
"type": "Item",
"flags": {}
},
{
"label": "Advanced Maneuvers",
"name": "AC-Advanced-Maneuvers",
"path": "packs/ac-advanced-maneuvers",
"banner": "systems/pf2e/assets/compendium-banner/red.webp",
"system": "pf2e",
"ownership": {
"PLAYER": "OBSERVER",
"ASSISTANT": "OWNER"
},
"type": "Item",
"flags": {}
},
{
"label": "Equipment",
"name": "ac-equipment",
"path": "packs/ac-equipment",
"banner": "systems/pf2e/assets/compendium-banner/red.webp",
"system": "pf2e",
"ownership": {
"PLAYER": "OBSERVER",
"ASSISTANT": "OWNER"
},
"type": "Item",
"flags": {}
},
{
"label": "Features",
"name": "AC-Features",
"path": "packs/ac-features",
"banner": "systems/pf2e/assets/compendium-banner/red.webp",
"system": "pf2e",
"ownership": {
"PLAYER": "OBSERVER",
"ASSISTANT": "OWNER"
},
"type": "Item",
"flags": {}
},
{
"label": "Support Benefits",
"name": "AC-Support",
"path": "packs/ac-support-benefits",
"banner": "systems/pf2e/assets/compendium-banner/red.webp",
"system": "pf2e",
"ownership": {
"PLAYER": "OBSERVER",
"ASSISTANT": "OWNER"
},
"type": "Item",
"flags": {}
},
{
"label": "Construct Companions",
"name": "AC-Construct-Companions",
"path": "packs/ac-construct-companions",
"banner": "systems/pf2e/assets/compendium-banner/red.webp",
"system": "pf2e",
"ownership": {
"PLAYER": "OBSERVER",
"ASSISTANT": "OWNER"
},
"type": "Item",
"flags": {}
},
{
"label": "Construct Breakthroughs",
"name": "AC-Construct-Breakthroughs",
"path": "packs/ac-construct-breakthroughs",
"banner": "systems/pf2e/assets/compendium-banner/red.webp",
"system": "pf2e",
"ownership": {
"PLAYER": "OBSERVER",
"ASSISTANT": "OWNER"
},
"type": "Item",
"flags": {}
},
{
"label": "Eidolons",
"name": "AC-Eidolons",
"path": "packs/ac-eidolons",
"banner": "systems/pf2e/assets/compendium-banner/red.webp",
"system": "pf2e",
"ownership": {
"PLAYER": "OBSERVER",
"ASSISTANT": "OWNER"
},
"type": "Item",
"flags": {}
},
{
"label": "Evolution Feats",
"name": "AC-Evolution-Feats",
"path": "packs/ac-evolution-feats",
"banner": "systems/pf2e/assets/compendium-banner/red.webp",
"system": "pf2e",
"ownership": {
"PLAYER": "OBSERVER",
"ASSISTANT": "OWNER"
},
"type": "Item",
"flags": {}
}
],
"packFolders": [
{
"name": "Companion Compendia",
"sorting": "m",
"packs": [
"AC-Ancestries-and-Class",
"AC-Feats",
"AC-Advanced-Maneuvers",
"ac-equipment",
"AC-Features",
"AC-Evolution-Feats",
"AC-Eidolons",
"AC-Construct-Breakthroughs",
"AC-Construct-Companions",
"AC-Support"
]
}
],
"media": [
{
"type": "setup",
"caption": "Pathfinder 2e Companion Compendia",
"thumbnail": "modules/pf2e-animal-companions/art/preview.webp"
}
],
"manifest": "https://raw.githubusercontent.com/TikaelSol/PF2e-Animal-Companions/master/module.json",
"download": "https://github.com/TikaelSol/PF2e-Animal-Companions/archive/refs/heads/main.zip",
"compatibility": {
"minimum": "11",
"verified": "12"
},
"relationships": {
"systems": [
{
"id": "pf2e",
"type": "system",
"manifest": "https://github.com/foundryvtt/pf2e/releases/latest/download/system.json",
"compatibility": {
"minimum": "5.14"
}
}
]
},
"esmodules": [
"scripts/warnings.js"
],
"authors": [
{
"name": "Tikael",
"flags": {}
}
]
}
Binary file added build/packs/ac-advanced-maneuvers/000005.ldb
Binary file not shown.
Binary file added build/packs/ac-advanced-maneuvers/000009.ldb
Binary file not shown.
File renamed without changes.
1 change: 1 addition & 0 deletions build/packs/ac-advanced-maneuvers/CURRENT
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MANIFEST-000011
File renamed without changes.
3 changes: 3 additions & 0 deletions build/packs/ac-advanced-maneuvers/LOG
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
2024/12/10-20:21:09.679 7fc Recovering log #10
2024/12/10-20:21:09.694 7fc Delete type=0 #10
2024/12/10-20:21:09.694 7fc Delete type=3 #8
5 changes: 5 additions & 0 deletions build/packs/ac-advanced-maneuvers/LOG.old
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
2024/12/10-20:19:38.492 ebc Recovering log #7
2024/12/10-20:19:38.492 ebc Level-0 table #9: started
2024/12/10-20:19:38.498 ebc Level-0 table #9: 50142 bytes OK
2024/12/10-20:19:38.505 ebc Delete type=0 #7
2024/12/10-20:19:38.505 ebc Delete type=3 #6
Binary file added build/packs/ac-advanced-maneuvers/MANIFEST-000011
Binary file not shown.
Binary file added build/packs/ac-ancestries-and-class/000005.ldb
Binary file not shown.
Binary file added build/packs/ac-ancestries-and-class/000009.ldb
Binary file not shown.
File renamed without changes.
1 change: 1 addition & 0 deletions build/packs/ac-ancestries-and-class/CURRENT
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MANIFEST-000011
File renamed without changes.
3 changes: 3 additions & 0 deletions build/packs/ac-ancestries-and-class/LOG
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
2024/12/10-20:21:09.772 2bd0 Recovering log #10
2024/12/10-20:21:09.777 2bd0 Delete type=0 #10
2024/12/10-20:21:09.777 2bd0 Delete type=3 #8
5 changes: 5 additions & 0 deletions build/packs/ac-ancestries-and-class/LOG.old
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
2024/12/10-20:19:38.436 1a8c Recovering log #7
2024/12/10-20:19:38.437 1a8c Level-0 table #9: started
2024/12/10-20:19:38.446 1a8c Level-0 table #9: 141365 bytes OK
2024/12/10-20:19:38.456 1a8c Delete type=0 #7
2024/12/10-20:19:38.456 1a8c Delete type=3 #6
Binary file added build/packs/ac-ancestries-and-class/MANIFEST-000011
Binary file not shown.
Binary file added build/packs/ac-construct-breakthroughs/000005.ldb
Binary file not shown.
Binary file added build/packs/ac-construct-breakthroughs/000009.ldb
Binary file not shown.
File renamed without changes.
1 change: 1 addition & 0 deletions build/packs/ac-construct-breakthroughs/CURRENT
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MANIFEST-000011
File renamed without changes.
3 changes: 3 additions & 0 deletions build/packs/ac-construct-breakthroughs/LOG
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
2024/12/10-20:21:09.866 7fc Recovering log #10
2024/12/10-20:21:09.872 7fc Delete type=0 #10
2024/12/10-20:21:09.873 7fc Delete type=3 #8
5 changes: 5 additions & 0 deletions build/packs/ac-construct-breakthroughs/LOG.old
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
2024/12/10-20:19:38.615 1b64 Recovering log #7
2024/12/10-20:19:38.615 1b64 Level-0 table #9: started
2024/12/10-20:19:38.620 1b64 Level-0 table #9: 13861 bytes OK
2024/12/10-20:19:38.628 1b64 Delete type=0 #7
2024/12/10-20:19:38.629 1b64 Delete type=3 #6
Binary file not shown.
Binary file added build/packs/ac-construct-companions/000005.ldb
Binary file not shown.
Binary file added build/packs/ac-construct-companions/000009.ldb
Binary file not shown.
File renamed without changes.
1 change: 1 addition & 0 deletions build/packs/ac-construct-companions/CURRENT
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MANIFEST-000011
File renamed without changes.
3 changes: 3 additions & 0 deletions build/packs/ac-construct-companions/LOG
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
2024/12/10-20:21:09.898 7fc Recovering log #10
2024/12/10-20:21:09.904 7fc Delete type=0 #10
2024/12/10-20:21:09.904 7fc Delete type=3 #8
5 changes: 5 additions & 0 deletions build/packs/ac-construct-companions/LOG.old
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
2024/12/10-20:19:38.591 1a8c Recovering log #7
2024/12/10-20:19:38.591 1a8c Level-0 table #9: started
2024/12/10-20:19:38.594 1a8c Level-0 table #9: 7991 bytes OK
2024/12/10-20:19:38.607 1a8c Delete type=0 #7
2024/12/10-20:19:38.608 1a8c Delete type=3 #6
Binary file added build/packs/ac-construct-companions/MANIFEST-000011
Binary file not shown.
Binary file added build/packs/ac-eidolons/000005.ldb
Binary file not shown.
Binary file added build/packs/ac-eidolons/000009.ldb
Binary file not shown.
File renamed without changes.
1 change: 1 addition & 0 deletions build/packs/ac-eidolons/CURRENT
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MANIFEST-000011
File renamed without changes.
3 changes: 3 additions & 0 deletions build/packs/ac-eidolons/LOG
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
2024/12/10-20:21:09.921 2238 Recovering log #10
2024/12/10-20:21:09.925 2238 Delete type=0 #10
2024/12/10-20:21:09.926 2238 Delete type=3 #8
5 changes: 5 additions & 0 deletions build/packs/ac-eidolons/LOG.old
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
2024/12/10-20:19:38.636 36b8 Recovering log #7
2024/12/10-20:19:38.636 36b8 Level-0 table #9: started
2024/12/10-20:19:38.641 36b8 Level-0 table #9: 26769 bytes OK
2024/12/10-20:19:38.647 36b8 Delete type=0 #7
2024/12/10-20:19:38.648 36b8 Delete type=3 #6
Binary file added build/packs/ac-eidolons/MANIFEST-000011
Binary file not shown.
Binary file not shown.
Binary file added build/packs/ac-equipment/000009.ldb
Binary file not shown.
File renamed without changes.
1 change: 1 addition & 0 deletions build/packs/ac-equipment/CURRENT
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MANIFEST-000011
File renamed without changes.
3 changes: 3 additions & 0 deletions build/packs/ac-equipment/LOG
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
2024/12/10-20:21:09.946 7fc Recovering log #10
2024/12/10-20:21:09.951 7fc Delete type=0 #10
2024/12/10-20:21:09.952 7fc Delete type=3 #8
5 changes: 5 additions & 0 deletions build/packs/ac-equipment/LOG.old
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
2024/12/10-20:19:38.514 1a8c Recovering log #7
2024/12/10-20:19:38.514 1a8c Level-0 table #9: started
2024/12/10-20:19:38.529 1a8c Level-0 table #9: 3845 bytes OK
2024/12/10-20:19:38.537 1a8c Delete type=0 #7
2024/12/10-20:19:38.537 1a8c Delete type=3 #6
Binary file added build/packs/ac-equipment/MANIFEST-000011
Binary file not shown.
Binary file added build/packs/ac-evolution-feats/000005.ldb
Binary file not shown.
Binary file added build/packs/ac-evolution-feats/000009.ldb
Binary file not shown.
File renamed without changes.
1 change: 1 addition & 0 deletions build/packs/ac-evolution-feats/CURRENT
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MANIFEST-000011
File renamed without changes.
3 changes: 3 additions & 0 deletions build/packs/ac-evolution-feats/LOG
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
2024/12/10-20:21:09.962 2238 Recovering log #10
2024/12/10-20:21:09.970 2238 Delete type=0 #10
2024/12/10-20:21:09.970 2238 Delete type=3 #8
5 changes: 5 additions & 0 deletions build/packs/ac-evolution-feats/LOG.old
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
2024/12/10-20:19:38.656 ebc Recovering log #7
2024/12/10-20:19:38.656 ebc Level-0 table #9: started
2024/12/10-20:19:38.661 ebc Level-0 table #9: 24093 bytes OK
2024/12/10-20:19:38.668 ebc Delete type=0 #7
2024/12/10-20:19:38.668 ebc Delete type=3 #6
Binary file added build/packs/ac-evolution-feats/MANIFEST-000011
Binary file not shown.
Binary file added build/packs/ac-feats/000005.ldb
Binary file not shown.
Binary file added build/packs/ac-feats/000009.ldb
Binary file not shown.
Binary file added build/packs/ac-feats/000012.ldb
Binary file not shown.
File renamed without changes.
1 change: 1 addition & 0 deletions build/packs/ac-feats/CURRENT
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MANIFEST-000011
File renamed without changes.
5 changes: 5 additions & 0 deletions build/packs/ac-feats/LOG
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
2024/12/10-20:21:10.006 2bd0 Recovering log #10
2024/12/10-20:21:10.006 2bd0 Level-0 table #12: started
2024/12/10-20:21:10.009 2bd0 Level-0 table #12: 2273 bytes OK
2024/12/10-20:21:10.013 2bd0 Delete type=0 #10
2024/12/10-20:21:10.013 2bd0 Delete type=3 #8
5 changes: 5 additions & 0 deletions build/packs/ac-feats/LOG.old
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
2024/12/10-20:19:38.467 1b64 Recovering log #7
2024/12/10-20:19:38.468 1b64 Level-0 table #9: started
2024/12/10-20:19:38.474 1b64 Level-0 table #9: 29223 bytes OK
2024/12/10-20:19:38.484 1b64 Delete type=0 #7
2024/12/10-20:19:38.484 1b64 Delete type=3 #6
Binary file added build/packs/ac-feats/MANIFEST-000011
Binary file not shown.
Binary file added build/packs/ac-features/000005.ldb
Binary file not shown.
Binary file added build/packs/ac-features/000009.ldb
Binary file not shown.
File renamed without changes.
1 change: 1 addition & 0 deletions build/packs/ac-features/CURRENT
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MANIFEST-000011
File renamed without changes.
3 changes: 3 additions & 0 deletions build/packs/ac-features/LOG
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
2024/12/10-20:21:10.040 2238 Recovering log #10
2024/12/10-20:21:10.045 2238 Delete type=0 #10
2024/12/10-20:21:10.045 2238 Delete type=3 #8
5 changes: 5 additions & 0 deletions build/packs/ac-features/LOG.old
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
2024/12/10-20:19:38.544 1b64 Recovering log #7
2024/12/10-20:19:38.545 1b64 Level-0 table #9: started
2024/12/10-20:19:38.551 1b64 Level-0 table #9: 98842 bytes OK
2024/12/10-20:19:38.559 1b64 Delete type=0 #7
2024/12/10-20:19:38.559 1b64 Delete type=3 #6
Binary file added build/packs/ac-features/MANIFEST-000011
Binary file not shown.
Binary file added build/packs/ac-support-benefits/000005.ldb
Binary file not shown.
Binary file added build/packs/ac-support-benefits/000009.ldb
Binary file not shown.
File renamed without changes.
Loading

0 comments on commit e7c4037

Please sign in to comment.