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

Added CI job for releasing templates #419

Merged
merged 2 commits into from
May 7, 2024
Merged

Added CI job for releasing templates #419

merged 2 commits into from
May 7, 2024

Conversation

rasmus-kirk
Copy link
Contributor

Purpose

Since we added support in cargo-concordium to select template tags (see this PR), it would be nice with a streamlined way to release new versions of these templates. This also fixes CI issues when updating templates, as they no longer run on lint, but only on release.

See also #331

Changes

Added template release job and moved some template related checks from the linter to the new release job instead.

Checklist

  • My code follows the style of this project.
  • The code compiles without warnings.
  • I have performed a self-review of the changes.
  • I have documented my code, in particular the intent of the
    hard-to-understand areas.
  • (If necessary) I have updated the CHANGELOG.

@abizjak
Copy link
Member

abizjak commented Apr 22, 2024

@limemloh I did not manage to fully complete this so I'm explaining what the plan was.

As you know it's currently rather annoying to update all the components since often templates rely on as of yet unpublished libraries.

In order to fix this two steps are needed

  • cargo cocnordium is to be updated so that it does not always take things from main, but from a tag, which defaults to releases/templates/latest
  • the CI in this repository should be updated so that templates are only checked when new template tags are created.

Now since we have cargo-concordium out in the wild we must first release a new version of cargo-concordium and wait some time, e.g., two weeks before we break templates on main.

Merge this PR.

The purpose of the change is that we will have normal releases for templates as well as for libraries. These template releases are created by a job defined in this PR. The purpose is to make sure that templates build and check out before making the tag.

This job is defined to create a release of the form releases/templates/v1.2.3 which should be protected and stable. Then we will have the special releases/templates/latest tag which will be updated to the "latest" version in separate step, which might as well be manual. This is similar to how docker images are versioned, with a special "latest" tag for lazy people.

In addition to the changes in this PR, the daily job https://github.com/Concordium/concordium-rust-smart-contracts/blob/main/.github/workflows/check-generate-latest.yaml should be updated to check templates from latest with the latest cargo-generate.

@abizjak abizjak requested review from limemloh and removed request for abizjak April 22, 2024 20:00
Copy link
Member

@abizjak abizjak left a comment

Choose a reason for hiding this comment

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

I think this generally looks good. But @limemloh should take over as described in the comment I added.

.github/workflows/release-templates.yaml Show resolved Hide resolved
.github/workflows/release-templates.yaml Outdated Show resolved Hide resolved
@rasmus-kirk rasmus-kirk merged commit e89117e into main May 7, 2024
138 checks passed
@rasmus-kirk rasmus-kirk deleted the template-releases branch May 7, 2024 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants