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

ci: add publish #52

Merged
merged 3 commits into from
Jan 31, 2024
Merged

ci: add publish #52

merged 3 commits into from
Jan 31, 2024

Conversation

juliangruber
Copy link
Member

This automatically publishes the module source ip IPFS/IPNI, when a release has been created. Then, Station Core's auto updater will be able fetch it.

All secrets have been configured on the repo, and stored in 1password with additional context.

Caveat: If we create a new stable release, which is however not the "latest" version, the action will publish it and overwrite the current IPNI pointer anyways. I see this as low risk atm. Do you have any ideas how we could circumvent that?

@bajtos
Copy link
Member

bajtos commented Jan 31, 2024

Caveat: If we create a new stable release, which is however not the "latest" version, the action will publish it and overwrite the current IPNI pointer anyways. I see this as low risk atm. Do you have any ideas how we could circumvent that?

Can we skip the "publish to IPFS/IPNS" step for pre-release releases?

That way:

  • Creating a "proper" GitHub release updates the IPNS link
  • Creating a "pre-release" GitHub release does not update it

A quick search found this GHA discussion, I don't know if the information is still relevant though.
https://github.com/orgs/community/discussions/26281

if: "!github.event.release.prerelease"

@juliangruber
Copy link
Member Author

It's already skipped for prerelease versions. It is however unfortunately possible to create a release that is not a pre-release and not marked as latest:

Screenshot 2024-01-31 at 10 43 24

@bajtos
Copy link
Member

bajtos commented Jan 31, 2024

I see. I think the current version is good enough.

In the ideal world, we would want to decouple "publish to IPFS" from "update IPNS".

  • We can publish the source code to IPFS for all releases, including pre-releases. This step should record the CID somewhere in the release metadata. E.g., by adding a new txt file containing the CID to the release artefacts.
  • When the repository's Latest Release is updated by any means, we update the IPNS link to point to the CID of that release.

It seems like GitHub does not provide an event/trigger to detect when the repository's Latest Release was updated. Maybe that's an oversight worth reporting to GitHub?

Maybe it's worth capturing this as a new GH issue in filecoin-station/publish-zinnia-module-action.

Copy link
Member

@bajtos bajtos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍🏻

.github/workflows/publish.yml Show resolved Hide resolved
@juliangruber
Copy link
Member Author

I see. I think the current version is good enough.

In the ideal world, we would want to decouple "publish to IPFS" from "update IPNS".

  • We can publish the source code to IPFS for all releases, including pre-releases. This step should record the CID somewhere in the release metadata. E.g., by adding a new txt file containing the CID to the release artefacts.
  • When the repository's Latest Release is updated by any means, we update the IPNS link to point to the CID of that release.

Uploading non-latest IPFS assets isn't yet a requirement, so I don't see a need to split these apart, making the stack more complicated.

It seems like GitHub does not provide an event/trigger to detect when the repository's Latest Release was updated. Maybe that's an oversight worth reporting to GitHub?

Maybe it's worth capturing this as a new GH issue in filecoin-station/publish-zinnia-module-action.

Captured in filecoin-station/publish-zinnia-module-action#3 👍

@juliangruber juliangruber merged commit 7680a3a into main Jan 31, 2024
1 check passed
@juliangruber juliangruber deleted the add/publish-action branch January 31, 2024 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ done
Development

Successfully merging this pull request may close these issues.

2 participants