ci: register the version on foundryvtt.com from the release job - #22
Merged
Merged
Conversation
The site keeps its own list of versions, filled in by hand through a form. It sat four versions behind: 2.0.2, 2.0.3, 2.0.4 and 2.1.0 were released here and never appeared there, so nobody could install them from the site or be offered the update. 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.
The site keeps its own list of versions, and here it is filled in through a form by hand. It sat four versions behind: 2.0.2, 2.0.3, 2.0.4 and 2.1.0 were released in this repository and never appeared there, so nobody could install them from the site or be offered the update. 3.0.0 I added by hand today; this makes the next one automatic.
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 fcsouza/pdf-character-sheetPaste 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 same step is already on
masterin vttforge/settings-vault, where the payload was proven against the live API with"dry-run": trueand came backstatus: success. Here the workflow parses and the step lands afterCreate GitHub Release.It has not run against the API for this package yet. That happens on the next tag, and it fails loudly if anything is wrong.