ci: register the version on foundryvtt.com from the release job - #11
Merged
Merged
Conversation
The site keeps its own list of versions. A package with no entry there cannot be installed from the site and offers nobody an update, so filling that form by hand was the last manual step left in a release. The Package Release API takes the same fields over HTTP. The step runs last, because the site fetches the manifest to validate the entry and that file is a release asset: before the release exists it is a 404. The manifest URL names the tag rather than `latest`. An entry describes one version, and a moving URL would make every old entry install the newest build. Compatibility is read out of the manifest that was just built, so the site and the package cannot drift apart. Needs FOUNDRY_RELEASE_TOKEN in the repository secrets. Without it the step stops and says where to get the token.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Filling the version form on foundryvtt.com by hand was the last manual step left in a release. The site keeps its own list of versions, and a package with no entry there cannot be installed from the site and offers nobody an update.
How
The Package Release API takes the same fields over HTTP:
idplus areleaseobject withversion,manifest,notesandcompatibility.Three decisions worth naming:
latest. An entry describes one version, and a moving URL would make every old entry install the newest build.dist/module.json, the manifest that was just built, so the site and the package cannot drift apart.The answer body is printed before the status code is judged: a refusal explains itself there, and a step that shows only the number hides why.
What you have to do once
gh secret set FOUNDRY_RELEASE_TOKEN --repo vttforge/settings-vaultPaste the Package Release Token from the package edit page when it asks. Without the secret the step stops with a message saying exactly that, rather than failing somewhere obscure.
Checked
The workflow parses, and the step lands after
Create GitHub Release. The payloadjqbuilds, against the realdist/module.json:{ "id": "settings-vault", "release": { "version": "0.2.1", "manifest": "https://github.com/vttforge/settings-vault/releases/download/v0.2.1/module.json", "notes": "https://github.com/vttforge/settings-vault/releases/tag/v0.2.1", "compatibility": { "minimum": "14", "verified": "14" } } }Both URLs answer 200 today.
Note on 0.2.1
This lands after 0.2.1 was cut, so that version is not registered by it. I filled that row in the form by hand and left it for you to save. From 0.3.0 on, nothing to fill.