Skip to content

Commit b6074ab

Browse files
committed
v 1.5.0 - v13 update
1 parent fff4c11 commit b6074ab

7 files changed

Lines changed: 359 additions & 59 deletions

File tree

.claude/settings.local.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"WebSearch",
5+
"WebFetch(domain:foundryvtt.com)",
6+
"WebFetch(domain:foundryvtt.wiki)"
7+
]
8+
}
9+
}

.github/workflows/README.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# GitHub Actions Workflows
2+
3+
## Automatic Release Creation
4+
5+
This repository includes an automated release workflow that triggers whenever you update the version in `module.json`.
6+
7+
### How It Works
8+
9+
1. **Update the version** in `module.json`:
10+
```json
11+
{
12+
"version": "1.5.0"
13+
}
14+
```
15+
16+
2. **Commit and push** to the `main` branch:
17+
```bash
18+
git add module.json
19+
git commit -m "v1.5.0"
20+
git push origin main
21+
```
22+
23+
3. **The workflow automatically**:
24+
- Detects the version change
25+
- Creates `module.zip` (containing the entire module)
26+
- Creates a GitHub Release with tag `v1.5.0`
27+
- Uploads both `module.zip` and `module.json` to the release
28+
- Generates release notes with installation instructions
29+
30+
### What Gets Packaged
31+
32+
The workflow packages everything EXCEPT:
33+
- `.git/` directory
34+
- `.github/` directory
35+
- `node_modules/`
36+
- `.gitignore`
37+
- `release-temp/` (temporary build directory)
38+
- Old `investigation-board.zip` files
39+
40+
### Release URLs
41+
42+
After the release is created, users can install via:
43+
- **Latest version**: `https://github.com/mordachai/investigation-board/releases/latest/download/module.json`
44+
- **Specific version**: `https://github.com/mordachai/investigation-board/releases/download/v1.5.0/module.json`
45+
46+
### Requirements
47+
48+
- The workflow runs automatically on GitHub
49+
- No additional setup needed (uses `GITHUB_TOKEN` which is provided automatically)
50+
- Make sure the repository has "Write" permissions for workflows (Settings → Actions → General → Workflow permissions)
51+
52+
### Troubleshooting
53+
54+
If the release isn't created:
55+
1. Check the Actions tab on GitHub to see the workflow run
56+
2. Ensure the version actually changed in the commit
57+
3. Verify you pushed to the `main` branch
58+
4. Check that Actions are enabled for your repository

.github/workflows/release.yml

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
name: Create Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'module.json'
9+
10+
jobs:
11+
check-version:
12+
runs-on: ubuntu-latest
13+
outputs:
14+
version: ${{ steps.get-version.outputs.version }}
15+
version-changed: ${{ steps.check-version.outputs.changed }}
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 2
21+
22+
- name: Get current version
23+
id: get-version
24+
run: |
25+
VERSION=$(jq -r '.version' module.json)
26+
echo "version=$VERSION" >> $GITHUB_OUTPUT
27+
echo "Current version: $VERSION"
28+
29+
- name: Check if version changed
30+
id: check-version
31+
run: |
32+
git diff HEAD^ HEAD -- module.json > diff.txt
33+
if grep -q '"version"' diff.txt; then
34+
echo "changed=true" >> $GITHUB_OUTPUT
35+
echo "Version changed detected"
36+
else
37+
echo "changed=false" >> $GITHUB_OUTPUT
38+
echo "Version not changed"
39+
fi
40+
41+
release:
42+
needs: check-version
43+
if: needs.check-version.outputs.version-changed == 'true'
44+
runs-on: ubuntu-latest
45+
permissions:
46+
contents: write
47+
steps:
48+
- name: Checkout code
49+
uses: actions/checkout@v4
50+
51+
- name: Get module info
52+
id: module-info
53+
run: |
54+
VERSION=$(jq -r '.version' module.json)
55+
TITLE=$(jq -r '.title' module.json)
56+
echo "version=$VERSION" >> $GITHUB_OUTPUT
57+
echo "title=$TITLE" >> $GITHUB_OUTPUT
58+
echo "Preparing release for $TITLE v$VERSION"
59+
60+
- name: Create module.zip
61+
run: |
62+
# Create the zip with only essential module files
63+
zip -r module.zip \
64+
module.json \
65+
scripts/ \
66+
styles/ \
67+
templates/ \
68+
assets/ \
69+
LICENSE
70+
71+
# Verify the zip was created
72+
ls -lh module.zip
73+
echo "Module packaged successfully"
74+
75+
# Show contents
76+
echo "Contents of module.zip:"
77+
unzip -l module.zip
78+
79+
- name: Create Release
80+
uses: softprops/action-gh-release@v1
81+
with:
82+
tag_name: v${{ steps.module-info.outputs.version }}
83+
name: ${{ steps.module-info.outputs.title }} v${{ steps.module-info.outputs.version }}
84+
body: |
85+
## ${{ steps.module-info.outputs.title }} v${{ steps.module-info.outputs.version }}
86+
87+
### Installation
88+
Install this version using the following manifest URL:
89+
```
90+
https://github.com/${{ github.repository }}/releases/download/v${{ steps.module-info.outputs.version }}/module.json
91+
```
92+
93+
Or download `module.zip` and install manually.
94+
95+
### Compatibility
96+
- Foundry VTT v13.332+
97+
98+
See [CHANGELOG.md](https://github.com/${{ github.repository }}/blob/main/CHANGELOG.md) for details.
99+
files: |
100+
module.zip
101+
module.json
102+
draft: false
103+
prerelease: false
104+
env:
105+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
106+
107+
- name: Update latest release links
108+
run: |
109+
echo "Release created successfully!"
110+
echo "Download URL: https://github.com/${{ github.repository }}/releases/download/v${{ steps.module-info.outputs.version }}/module.zip"
111+
echo "Manifest URL: https://github.com/${{ github.repository }}/releases/download/v${{ steps.module-info.outputs.version }}/module.json"

.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Node modules
2+
node_modules/
3+
4+
# Build artifacts
5+
*.zip
6+
release-temp/
7+
8+
# IDE
9+
.vscode/
10+
.idea/
11+
*.swp
12+
*.swo
13+
14+
# OS
15+
.DS_Store
16+
Thumbs.db
17+
18+
# Logs
19+
*.log
20+
npm-debug.log*
21+
22+
# Temporary files
23+
*.tmp
24+
.cache/

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ Paste the following manifest URL into the bottom Manifest URL field: https://raw
5858

5959
After that go to your world and enable the module in your Game Settings under Manage Modules
6060

61+
## Compatibility
62+
63+
- **Foundry VTT v13.x** (minimum v13.332)
64+
- For Foundry v12.x, please use module version 1.3.2
65+
6166
## Known Limitations
6267

6368
- **Refresh on Update:** The module includes a hook to ensure notes are redrawn when updated by others. However, if something seems out of date, try selecting/deselecting notes or refreshing the page.

module.json

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"name": "investigation-board",
2+
"id": "investigation-board",
33
"title": "Investigation Board",
44
"description": "A Foundry VTT module that lets everyone create, edit, and move sticky and photo notes on the scene as collaborative investigation tools.",
5-
"version": "1.3.2",
5+
"version": "1.5.0",
66
"authors": [
77
{
88
"name": "Gus",
@@ -11,8 +11,8 @@
1111
}
1212
],
1313
"compatibility": {
14-
"minimum": "12",
15-
"verified": "12"
14+
"minimum": "13.332",
15+
"verified": "13.346"
1616
},
1717
"esmodules": [
1818
"scripts/settings.js",
@@ -22,10 +22,7 @@
2222
"styles/style.css"
2323
],
2424
"packs": [],
25-
"templates": [
26-
"templates/drawing-sheet.html"
27-
],
2825
"url": "https://github.com/mordachai/investigation-board",
29-
"manifest": "https://github.com/mordachai/investigation-board/raw/main/module.json",
30-
"download": "https://github.com/mordachai/investigation-board/raw/main/investigation-board.zip"
26+
"manifest": "https://github.com/mordachai/investigation-board/releases/latest/download/module.json",
27+
"download": "https://github.com/mordachai/investigation-board/releases/latest/download/module.zip"
3128
}

0 commit comments

Comments
 (0)