Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable auto-publication #553

Merged
merged 3 commits into from
Aug 1, 2024
Merged

Enable auto-publication #553

merged 3 commits into from
Aug 1, 2024

Conversation

tidoust
Copy link
Member

@tidoust tidoust commented Jul 22, 2024

This automates the publication of all 9 EME documents to the gh-pages branch and to /TR, using the w3c/spec-prod action.

The W3CTRMANIFEST files are no longer needed as a result and nothing needs to be Git-ignored anymore either.

Also note the change of shortname for Encrypted Media Extensions to encrypted-media-2.

I added the Echidna tokens as repository secrets.


Preview | Diff

This automates the publication of all 9 EME documents to the `gh-pages` branch
and to /TR, using the w3c/spec-prod action.

The `W3CTRMANIFEST` files are no longer needed as a result and nothing needs to
be Git-ignored anymore either.

Also note the change of shortname for Encrypted Media Extensions to
`encrypted-media-2`.
@chrisn
Copy link
Member

chrisn commented Jul 22, 2024

Thank you, I have just one question. I notice that /TR/encrypted-media now also shows the FPWD, will both /TR/encrypted-media and /TR/encrypted-media-2 point to the same document as we make more updates? Or should /TR/encrypted-media still point to the existing Rec?

@tidoust
Copy link
Member Author

tidoust commented Jul 22, 2024

Thank you, I have just one question. I notice that /TR/encrypted-media now also shows the FPWD, will both /TR/encrypted-media and /TR/encrypted-media-2 point to the same document as we make more updates?

Yes. I requested the same setting as for MSE: the series shortname encrypted-media returns the latest level of the specification, meaning encrypted-media-2.

Or should /TR/encrypted-media still point to the existing Rec?

Same as for MSE as well: the previous Recommendation got a (new) encrypted-media-1 shortname and is available at https://www.w3.org/TR/encrypted-media-1/.

@chrisn
Copy link
Member

chrisn commented Jul 22, 2024

Perfect, that all makes sense.

@marcoscaceres
Copy link
Member

Will these all run when we change one file? I wonder if we should bind each job to a particular path?

@tidoust
Copy link
Member Author

tidoust commented Jul 23, 2024

Will these all run when we change one file?

Yes.

I wonder if we should bind each job to a particular path?

That would be useful for WebCodecs too (16 jobs run whenever a file is changed).

It's not trivial because the paths filter runs at the workflow level, whereas we would need it at the job level.

We could create one workflow per document. That works. That's not DRY-friendly. But then that's simple. Thinking about it, it should be trivial to script the creation of the workflow document to ease maintenance and address the "not DRY-friendly" concern.

Or we need to check what changed ourselves within a step. The Paths Change Filter action seems to provide what we need. To avoid starting a new job for each and every document, we would need to drop the "matrix" approach, and rather create one step per document. We'd lose a bit of DRY-ness as well.

I'll look into it. Let me know if you see other approaches!

Automate all the things!

This adds an auto-publish workflow template and a companion script to generate
auto-publish workflows for each and every spec in the repository that only run
when needed, meaning only when the spec source did change. The script only
needs to run once in a while when new specs get added or when the workflows
need to change.

Script and template are in the `.github` folder to avoid polluting the repo
with build tools.
@tidoust
Copy link
Member Author

tidoust commented Jul 23, 2024

I created dedicated workflows with paths filters, generated from a companion script and a workflow template that I put under the .github folder as well. How does that look, @marcoscaceres?

@tidoust
Copy link
Member Author

tidoust commented Aug 1, 2024

Merging. We can always iterate and improve the workflow afterwards :)

@tidoust tidoust merged commit cefbd73 into main Aug 1, 2024
2 checks passed
github-actions bot added a commit that referenced this pull request Aug 1, 2024
SHA: cefbd73
Reason: push, by tidoust

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants