ReadAlongs / Studio-Web

Suite of web packages for creating interactive ReadAlongs (this repo was formerly called Web-Component)
https://readalong-studio.mothertongues.org/
Other
10 stars 9 forks source link

ci: update publish workflow to work on tag push #276

Closed joanise closed 6 months ago

joanise commented 6 months ago

PR Goal?

Change the publication workflow to work on tag push instead of PR to release

Feedback sought?

Priority?

high

Tests added?

n/a

How to test?

Good question, still need to figure this out!

Confidence?

medium

Version change?

no

github-actions[bot] commented 6 months ago

PR Preview Action v1.4.7 :---: :rocket: Deployed preview to https://ReadAlongs.github.io/Studio-Web/pr-preview/pr-276/ on branch gh-pages at 2024-05-02 16:20 UTC

joanise commented 6 months ago

Tested the workflow by creating a variant that ran on push to test1.2.3 and did dry run operations. See https://github.com/ReadAlongs/Studio-Web/actions/runs/8914132259/job/24481166770 It looks like it works fine.

joanise commented 6 months ago

Darn, @dhdaines we worked in parallel. Before leaving work yesterday, I had almost completed the same checks you did later in the evening. See https://github.com/ReadAlongs/Studio-Web/commit/decc1d72b2faf0168820fc9404bf953e5a51a652 My checks are a little more complete, but use jq instead of npm. Do you have a preference between your solution and mine?

dhdaines commented 6 months ago

Darn, @dhdaines we worked in parallel. Before leaving work yesterday, I had almost completed the same checks you did later in the evening. See decc1d7 My checks are a little more complete, but use jq instead of npm. Do you have a preference between your solution and mine?

Yours are more complete but I think it would be preferable to use npm since it's already there... should be pretty easy to just drop in the npm calls that I did.

joanise commented 6 months ago

Yours are more complete but I think it would be preferable to use npm since it's already there... should be pretty easy to just drop in the npm calls that I did.

jq is there by default on all the runner images on GitHub, so being there is not an issue. I like how jq can run earlier, before we even build, and thus fail early. But I like how your npm commands run on actual builds in dist/. (And, ah-ha! that's how to do it locally! I tried and failed to get npm view to dome something useful with packages/web-component.)

I don't see an npm view equivalent for "$(jq -r .singleFileBundleVersion packages/studio-web/package.json)" != "$VERSION", though, since we don't build or publish that package, but we still want to check this.

dhdaines commented 6 months ago

Ah, good to know ... so no problem to use jq, or npm view either for that matter :) your checks are more complete and probably more correct.

joanise commented 6 months ago

Ah, good to know ... so no problem to use jq, or npm view either for that matter :) your checks are more complete and probably more correct.

Thanks for doing yours, though, and sorry for not flagging that I was writing them yesterday.