-
Notifications
You must be signed in to change notification settings - Fork 83
Add workflow to publish new version of immutable action on every release #623
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
Add workflow to publish new version of immutable action on every release #623
Conversation
Adds a workflow that publishes a new version of the immutable action package for this action on every release.
65d9fb1
to
bf883d6
Compare
I like the idea, but the publish immutable action repo specifically mentions it is not ready for use, so maybe we should hold off on this?
|
Co-authored-by: Nish Sinha <[email protected]>
Good spot. However, we are part of the internal beta, and I pulled this directly from their migration instructions. I also requested a review from that team last night to sanity check that we're still on their paved path. |
Co-authored-by: Nish Sinha <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! We should try this out by tagging a new release!
|
||
on: | ||
release: | ||
types: [published] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per @konradpabjan on internal slack:
A couple of months ago in actions/cache when we were releasing a new version,
published
wasn't running for all scenarios due to some edge case I'm having a hard time remembering so we switched toreleased
and that has been working well
actions/cache#1557
types: [published] | |
types: [released] |
However, I looked into this a bit, here's the docs:
- https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#release
- https://docs.github.com/en/webhooks/webhook-events-and-payloads?actionType=released#release
- https://docs.github.com/en/webhooks/webhook-events-and-payloads?actionType=published#release
The relevant bit is:
The
prereleased
type will not trigger for pre-releases published from draft releases, but thepublished
type will trigger. If you want a workflow to run when stable and pre-releases publish, subscribe topublished
instead ofreleased
andprereleased
.
So after reading that, I'm inclined to stick with published
for now and re-evaluate if we encounter problems. We haven't had problems in Dependabot-core where we also use published
:
https://github.com/dependabot/dependabot-core/blob/5b1bec9bf0e650af2ffd02e9dfcc2e885dd8a32b/.github/workflows/gems-release-to-rubygems.yml#L7
Although that may be because we simply don't use pre-release versions at all...
Anyway, I'm going to ship what we've got and leave this here as breadcrumbs for the future if we do run into problems.
I just tagged a new release to check if this works: And indeed I see the new package release reflected here: So it's working! 🎉 |
Adds a workflow that publishes a new version of the immutable action package for this action on every release.