forked from fantasycalendar/FoundryVTT-MinionManager
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 6aef414
Showing
9 changed files
with
308 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# This file controls the configuration for the "Dependabot" service, used to keep dependencies updated. | ||
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file | ||
# See the above link for the reason why "directory" is set to "/" | ||
version: 2 | ||
updates: | ||
# GitHub Actions | ||
- package-ecosystem: "github-actions" | ||
open-pull-requests-limit: 10 | ||
directory: "/" | ||
schedule: | ||
interval: "daily" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
# GitHub Actions workflow for creating a new FoundryVTT module release. | ||
# | ||
# Useful References: | ||
# - https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions | ||
# - https://docs.github.com/en/actions/learn-github-actions/contexts | ||
# - https://docs.github.com/en/actions/learn-github-actions/environment-variables | ||
# | ||
# Troubleshooting Checklist: | ||
# - Is the module's manifest file valid JSON? | ||
# You can test your manifest file using https://jsonlint.com/. | ||
# | ||
# - Does the module's manifest have all the required keys? | ||
# See https://foundryvtt.com/article/module-development/#manifest for more | ||
# information. | ||
# | ||
# - Are all the proper files and directories being included in the release's | ||
# module archive ("module.zip")? | ||
# Check that the correct files are being passed to the `zip` command run | ||
# in the "Create Module Archive" step below. | ||
# | ||
# - Is the release tag the proper format? | ||
# See the comments for the "Extract Version From Tag" step below. | ||
# | ||
# - Is a GitHub release being published? | ||
# This workflow will only run when a release is published, not when a | ||
# release is updated. Furthermore, note that while a GitHub release will | ||
# (by default) create a repository tag, a repository tag will not create | ||
# or publish a GitHub release. | ||
# | ||
# - Has the module's entry on FoundryVTT's module administration site | ||
# (https://foundryvtt.com/admin) been updated? | ||
# | ||
name: Create Module Files For GitHub Release | ||
|
||
|
||
env: | ||
# The URL used for the module's "Project URL" link on FoundryVTT's website. | ||
project_url: "https://github.com/${{github.repository}}" | ||
|
||
# A URL that will always point to the latest manifest. | ||
# FoundryVTT uses this URL to check whether the current module version that | ||
# is installed is the latest version. This URL should NOT change, | ||
# otherwise FoundryVTT won't be able to perform this check. | ||
latest_manifest_url: "https://github.com/${{github.repository}}/releases/latest/download/module.json" | ||
|
||
# The URL to the module archive associated with the module release being | ||
# processed by this workflow. | ||
release_module_url: "https://github.com/${{github.repository}}/releases/download/${{github.event.release.tag_name}}/module.zip" | ||
|
||
|
||
on: | ||
# Only run this workflow when a release is published. | ||
# To modify this workflow when other events occur, see: | ||
# - https://docs.github.com/en/actions/using-workflows/triggering-a-workflow | ||
# - https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows | ||
# - https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on | ||
# | ||
# Note that some steps may depend on context variables that are only | ||
# available for release events, so if you add other events, you may need to | ||
# alter other parts of this workflow. | ||
release: | ||
types: [published] | ||
|
||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
|
||
# Extract version embedded in the tag. | ||
# This step expects the tag to be one of the following formats: | ||
# - "v<major>.<minor>.<patch>" (e.g., "v1.2.3") | ||
# - "<major>.<minor>.<patch>" (e.g., "1.2.3") | ||
# | ||
# The version will be used by later steps to fill in the value for the | ||
# "version" key required for a valid module manifest. | ||
- name: Extract Version From Tag | ||
id: get_version | ||
uses: battila7/get-version-action@v2 | ||
|
||
|
||
# Modify "module.json" with values specific to the release. | ||
# Since the values for the "version" and "url" keys aren't known ahead of | ||
# time, the manifest file in the repository is updated with these values. | ||
# | ||
# While this does modify the manifest file in-place, the changes are not | ||
# commited to the repository, and only exist in the action's filesystem. | ||
- name: Modify Module Manifest With Release-Specific Values | ||
id: sub_manifest_link_version | ||
uses: cschleiden/replace-tokens@v1 | ||
with: | ||
files: 'module.json' | ||
env: | ||
VERSION: ${{steps.get_version.outputs.version-without-v}} | ||
URL: ${{ env.project_url }} | ||
MANIFEST: ${{ env.latest_manifest_url }} | ||
DOWNLOAD: ${{ env.release_module_url }} | ||
|
||
|
||
# Create a "module.zip" archive containing all the module's required files. | ||
# If you have other directories or files that will need to be added to | ||
# your packaged module, add them here. | ||
- name: Create Module Archive | ||
run: | | ||
# Note that `zip` will only emit warnings when a file or directory | ||
# doesn't exist, it will not fail. | ||
zip \ | ||
`# Options` \ | ||
--recurse-paths \ | ||
`# The name of the output file` \ | ||
./module.zip \ | ||
`# The files that will be included.` \ | ||
module.json \ | ||
README.md \ | ||
LICENSE \ | ||
templates \ | ||
scripts/ \ | ||
styles/ \ | ||
packs/ \ | ||
language/ \ | ||
lang/ | ||
# Don't forget to add a backslash at the end of the line for any | ||
# additional files or directories! | ||
# Update the GitHub release with the manifest and module archive files. | ||
- name: Update Release With Files | ||
id: create_version_release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
allowUpdates: true | ||
name: ${{ github.event.release.name }} | ||
draft: ${{ github.event.release.unpublished }} | ||
prerelease: ${{ github.event.release.prerelease }} | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
artifacts: './module.json, ./module.zip' | ||
tag: ${{ github.event.release.tag_name }} | ||
body: ${{ github.event.release.body }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2020 Repository Owner | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
![](https://img.shields.io/badge/Foundry-v10-informational) | ||
<!--- Downloads @ Latest Badge --> | ||
<!--- replace <user>/<repo> with your username/repository --> | ||
<!--- ![Latest Release Download Count](https://img.shields.io/github/downloads/<user>/<repo>/latest/module.zip) --> | ||
|
||
<!--- Forge Bazaar Install % Badge --> | ||
<!--- replace <your-module-name> with the `name` in your manifest --> | ||
<!--- ![Forge Installs](https://img.shields.io/badge/dynamic/json?label=Forge%20Installs&query=package.installs&suffix=%25&url=https%3A%2F%2Fforge-vtt.com%2Fapi%2Fbazaar%2Fpackage%2F<your-module-name>&colorB=4aa94a) --> | ||
|
||
|
||
# How to use this Template to create a versioned Release | ||
|
||
1. Open your repository's releases page. | ||
|
||
![Where to click to open repository releases.](https://user-images.githubusercontent.com/7644614/93409301-9fd25080-f864-11ea-9e0c-bdd09e4418e4.png) | ||
|
||
2. Click "Draft a new release" | ||
|
||
![Draft a new release button.](https://user-images.githubusercontent.com/7644614/93409364-c1333c80-f864-11ea-89f1-abfcb18a8d9f.png) | ||
|
||
3. Fill out the release version as the tag name. | ||
|
||
If you want to add details at this stage you can, or you can always come back later and edit them. | ||
|
||
![Release Creation Form](https://user-images.githubusercontent.com/7644614/93409543-225b1000-f865-11ea-9a19-f1906a724421.png) | ||
|
||
4. Hit submit. | ||
|
||
5. Wait a few minutes. | ||
|
||
A Github Action will run to populate the `module.json` and `module.zip` with the correct urls that you can then use to distribute this release. You can check on its status in the "Actions" tab. | ||
|
||
![Actions Tab](https://user-images.githubusercontent.com/7644614/93409820-c1800780-f865-11ea-8c6b-c3792e35e0c8.png) | ||
|
||
6. Grab the module.json url from the release's details page. | ||
|
||
![image](https://user-images.githubusercontent.com/7644614/93409960-10c63800-f866-11ea-83f6-270cc5d10b71.png) | ||
|
||
This `module.json` will only ever point at this release's `module.zip`, making it useful for sharing a specific version for compatibility purposes. | ||
|
||
7. You can use the url `https://github.com/<user>/<repo>/releases/latest/download/module.json` to refer to the manifest. | ||
|
||
This is the url you want to use to install the module typically, as it will get updated automatically. | ||
|
||
# How to List Your Releases on Package Admin | ||
|
||
To request a package listing for your first release, go to the [Package Submission Form](https://foundryvtt.com/packages/submit) (accessible via a link at the bottom of the "[Systems and Modules](https://foundryvtt.com/packages/)" page on the Foundry website). | ||
|
||
Fill in the form. "Package Name" must match the name in the module manifest. Package Title will be the display name for the package. Package URL should be your repo URL. | ||
![image](https://user-images.githubusercontent.com/36359784/120664263-b49e5500-c482-11eb-9126-af7006389903.png) | ||
|
||
|
||
One of the Foundry staff will typically get back to you with an approval or any further questions within a few days, and give you access to the package admin pages. | ||
|
||
Once you have access to the [module admin page](https://foundryvtt.com/admin/packages/package/), you can release a new version by going into the page for your module, scrolling to the bottom, and filling in a new Package Version. | ||
|
||
When listing a new version, Version should be the version number you set above, and the Manifest URL should be the manifest __for that specific version__ (do not use /latest/ here). | ||
![image](https://user-images.githubusercontent.com/36359784/120664346-c4b63480-c482-11eb-9d8b-731b50d70939.png) | ||
|
||
> ### :warning: Important :warning: | ||
> | ||
> It is very important that you use the specific release manifest url, and not the `/latest` url here. For more details about why this is important and how Foundry Installs/Updates packages, read [this wiki article](https://foundryvtt.wiki/en/development/guides/releases-and-history). | ||
Clicking "Save" in the bottom right will save the new version, which means that anyone installing your module from within Foundry will get that version, and a post will be generated in the #release-announcements channel on the official Foundry VTT Discord. | ||
|
||
|
||
# FoundryVTT Module | ||
|
||
Does something, probably | ||
|
||
## Changelog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"MODULE.hello": "hello" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
"id": "module", | ||
"title": "New Module", | ||
"description": "", | ||
"version": "#{VERSION}#", | ||
"library": "false", | ||
"manifestPlusVersion": "1.2.0", | ||
"compatibility": { | ||
"minimum": 10, | ||
"verified": 10, | ||
"maximum": 11 | ||
}, | ||
"authors": [ | ||
{ | ||
"name": "The League of Extraordinary FVTT Developers", | ||
"url": "https://github.com/League-of-Foundry-Developers", | ||
"discord": "discordID#0001" | ||
} | ||
], | ||
"relationships": { | ||
"systems": [], | ||
"requires": [] | ||
}, | ||
"esmodules": [ | ||
"scripts/module.js" | ||
], | ||
"scripts": [ | ||
"scripts/lib/lib.js" | ||
], | ||
"styles": [ | ||
"styles/module.css" | ||
], | ||
"languages": [ | ||
{ | ||
"lang": "en", | ||
"name": "English", | ||
"path": "languages/en.json" | ||
} | ||
], | ||
"url": "#{URL}#", | ||
"manifest": "#{MANIFEST}#", | ||
"download": "#{DOWNLOAD}#", | ||
"license": "LICENSE", | ||
"readme": "README.md", | ||
"media": [ | ||
{ | ||
"type": "icon", | ||
"url": "https://avatars2.githubusercontent.com/u/71292812?s=400&u=ccdb4eeb7abf551ca8f314e5a9bfd0479a4d3d41&v=4" | ||
} | ||
] | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Hooks.once('init', async function() { | ||
|
||
}); | ||
|
||
Hooks.once('ready', async function() { | ||
|
||
}); |
Empty file.