Github Releases to Distribute FoundryVTT Modules
Vložit
- čas přidán 3. 09. 2020
- In this video we cover how to use Github Releases to share your modules with other people.
UPDATE/FIX: One thing you can do is instead of pointing to the module.json in the release, point to /releases/latest/download/module.json instead, this will let Foundry auto update correct.
If you want to see the source code for this video: github.com/spacemandev-git/re...
If you want to track download stats for artifacts: somsubhra.com/github-release-...
Adding the zip file for the full package helped me get Foundry updates working properly. Now to see about submitting my game system to Foundry.
Really great series of videos. Would love to see how you can create an actor character sheet or how you can replace an existing character sheet for a system with your own.
For anyone using this as a reference as of 12/2022:
main.yml: Change -master to -main
main.yml: set-output is being or has been deprecated. change the format to
run: echo "version=$(node ./.github/workflows/get-version.js)" >> $GITHUB_OUTPUT
These changes allowed me to get this up and running as described in the video.
Also change the v2 in actions/checkout. like below
uses: actions/checkout@v3
man its awesome!
Great series!
This was awesome. I have been goofing around in github for hours and this literally showed me exactly what I needed to know. Thank you so much for these videos.
My question would be at what point do you stop writing a macro and turn it into a more in-depth module?
A good rule of thumb is that macros are useful when you have code you want to invoke via key press.
When you start wanting to write code listeners that listen for events and are always active in the background, you generally want Modules.
This is great. [0:8:30] I had been using the master branch's module.json as manifest, never thought to add it to releases. So it looks like in your example by adding module.json to the release it automatically updates the one in the master?
Great video! One question I have is if you do this and you merge something to the master branch that doesn't change the version, will it override the existing release version or just not process anything?
To answer my own question, it does overwrite the artifacts on the release of it is named the same. If you add the replaceArtifact: false flag to the yml file, it won't replace it or update the release build.
what is the difference between the download Zip stat and the download json stat
You have a bug. If you do the module.json like that and keep the manifest line with that version, it won't auto update in foundry. The manifest line should have your raw module.json from the main source code in that line :)
This is true, but instead of using the raw module.json you can do
You can instead use /releases/latest/download/module.json to always refer to the latest one
As it might not be obvious for some (it wasnt for me) you have to install git (www.digitalocean.com/community/tutorials/how-to-contribute-to-open-source-getting-started-with-git)
if you dont know how to number your versions: semver.org/