Skip to content

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

Conversation

jeffwidman
Copy link
Member

Adds a workflow that publishes a new version of the immutable action package for this action on every release.

@jeffwidman jeffwidman requested a review from a team as a code owner May 9, 2025 03:38
Adds a workflow that publishes a new version of the immutable action package
for this action on every release.
@jeffwidman jeffwidman force-pushed the add-workflow-to-publish-immutable-action-package-version-on-release branch from 65d9fb1 to bf883d6 Compare May 9, 2025 03:54
@Nishnha
Copy link
Member

Nishnha commented May 9, 2025

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?

Publish Immutable Action
Important

This action is not ready for public use. It is part of an upcoming public roadmap item (see github/roadmap#592). Attempts to use this action to upload an OCI artifact will not work until this feature has been fully released to the public. Please do not attempt to use it until that time.

@jeffwidman
Copy link
Member Author

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?

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.

Copy link
Member

@Nishnha Nishnha left a 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]
Copy link
Member Author

@jeffwidman jeffwidman May 9, 2025

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 to released and that has been working well
actions/cache#1557

Suggested change
types: [published]
types: [released]

However, I looked into this a bit, here's the docs:

The relevant bit is:

The prereleased type will not trigger for pre-releases published from draft releases, but the published type will trigger. If you want a workflow to run when stable and pre-releases publish, subscribe to published instead of released and prereleased.

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.

@jeffwidman jeffwidman merged commit 6ad01a0 into main May 9, 2025
8 checks passed
@jeffwidman jeffwidman deleted the add-workflow-to-publish-immutable-action-package-version-on-release branch May 9, 2025 23:37
@jeffwidman
Copy link
Member Author

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! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants