Concordium / concordium-rust-smart-contracts

Libraries and tools for writing and testing smart contracts on Concordium
https://docs.rs/concordium-std/latest/concordium_std/
Mozilla Public License 2.0
57 stars 36 forks source link

Added CI job for releasing templates #419

Closed rasmus-kirk closed 4 months ago

rasmus-kirk commented 4 months ago

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

abizjak commented 4 months ago

@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

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.