generated from League-of-Foundry-Developers/FoundryVTT-Module-Template
-
Notifications
You must be signed in to change notification settings - Fork 5
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 5ba4fc9
Showing
8 changed files
with
194 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,44 @@ | ||
name: Release Creation | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
# get part of the tag after the `v` | ||
- name: Extract tag version number | ||
id: get_version | ||
uses: battila7/get-version-action@v2 | ||
|
||
# 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: microsoft/variable-substitution@v1 | ||
with: | ||
files: 'module.json' | ||
env: | ||
version: ${{steps.get_version.outputs.version-without-v}} | ||
url: https://github.com/${{github.repository}} | ||
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 zip file with all files required by the module to add to the release | ||
- run: zip -r ./module.zip module.json LICENSE styles/ scripts/ templates/ languages/ | ||
|
||
# Create a release for this specific version | ||
- name: Update Release with Files | ||
id: create_version_release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
allowUpdates: true # Set this to false if you want to prevent updating existing releases | ||
name: ${{ github.event.release.name }} | ||
draft: false | ||
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 @@ | ||
 | ||
<!--- Downloads @ Latest Badge --> | ||
<!--- replace <user>/<repo> with your username/repository --> | ||
<!---  --> | ||
|
||
<!--- Forge Bazaar Install % Badge --> | ||
<!--- replace <your-module-name> with the `name` in your manifest --> | ||
<!---  --> | ||
|
||
|
||
# How to use this Template to create a versioned Release | ||
|
||
1. Open your repository's releases page. | ||
|
||
 | ||
|
||
2. Click "Draft a new release" | ||
|
||
 | ||
|
||
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. | ||
|
||
 | ||
|
||
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. | ||
|
||
 | ||
|
||
6. Grab the module.json url from the release's details page. | ||
|
||
 | ||
|
||
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. | ||
 | ||
|
||
|
||
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). | ||
 | ||
|
||
> ### :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,48 @@ | ||
{ | ||
"name": "module", | ||
"title": "New Module", | ||
"description": "", | ||
"version": "This is auto replaced", | ||
"library": "false", | ||
"manifestPlusVersion": "1.0.0", | ||
"minimumCoreVersion": "0.7.9", | ||
"compatibleCoreVersion": "0.7.9", | ||
"authors": [ | ||
{ | ||
"name": "The League of Extraordinary FVTT Developers", | ||
"url": "https://github.com/League-of-Foundry-Developers", | ||
"discord": "discordID#0001" | ||
} | ||
], | ||
"dependencies": [ | ||
|
||
], | ||
"conflicts": [ | ||
|
||
], | ||
"esmodules": [ | ||
"/scripts/module.js" | ||
], | ||
"scripts": [ | ||
"/scripts/lib/lib.js" | ||
], | ||
"styles": [ | ||
"/styles/module.css" | ||
], | ||
"languages": [ | ||
{ | ||
"lang": "en", | ||
"name": "English", | ||
"path": "languages/en.json" | ||
} | ||
], | ||
"url": "This is auto replaced", | ||
"manifest": "This is auto replaced", | ||
"download": "This is auto replaced", | ||
"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.