w3c / spec-prod

GitHub Action to build ReSpec/Bikeshed specs, validate output and publish to GitHub pages or W3C
https://w3c.github.io/spec-prod/
MIT License
34 stars 21 forks source link

fix: don't break with multiple specs, add `ARTIFACT_NAME` option #180

Closed oliverdunk closed 7 months ago

oliverdunk commented 7 months ago

In v2.11.0, actions/upload-artifact was updated to v4 which started to cause issues in the WebExtensions Community Group repository. In particular, v4 requires each invocation to have a unique artifact name (this was a breaking change) and that does not hold true when using spec-prod since there is no way to configure the name.

Configuration / Example failure

To resolve this, add a new input option to allow the name to be changed. After playing around for a bit this seemed like the simplest solution that would work for everyone :)


Preview | Diff

sidvishnoi commented 7 months ago

@oliverdunk Can you also verify it works fine by using it in a PR (perhaps for https://github.com/w3c/webextensions/issues/596) before I merge this PR? You'd need to replace uses: w3c/spec-prod@v2 with uses: oliverdunk/spec-prod@artifact-matrix-fix

oliverdunk commented 7 months ago

This is great @oliverdunk! Can you also add docs to docs/options.md, perhaps at the end of document?

Good call, done! I added it in the middle to be consistent with the ordering in the YML but feel free to move.

oliverdunk commented 7 months ago

Can you also verify it works fine by using it in a PR (perhaps for w3c/webextensions#596) before I merge this PR?

I tested it here which is hopefully a good enough dry run: https://github.com/oliverdunk/webextensions/actions/runs/8706490856/job/23879164260

If you'd really like to see it run in the main repository, let me know and happy to do that.

sidvishnoi commented 7 months ago

Brilliant! That dry run is more than enough. Thanks for the PR @oliverdunk!