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

Automatically create release tags via GitHub actions #8424

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/release-create-tag.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Create release tag
on:
push:
branches: [ develop ]
paths:
- 'src/config.inc'

jobs:
create-tag:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Get version
run: |
v=$(grep ^CBMC_VERSION src/config.inc | perl -p -e 's/^CBMC_VERSION\s*=\s*//')
echo "CBMC_VERSION=$v" >> $GITHUB_ENV
- name: Set new tag
uses: anothrNick/github-tag-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_BRANCHES: develop
CUSTOM_TAG: cbmc-${{ env.CBMC_VERSION }}
VERBOSE: false
DRY_RUN: true
23 changes: 9 additions & 14 deletions doc/ADR/release_process.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,18 @@
The current process we follow through to make a new release is the following:

1. At the point in time we want to make the release, we make a change to
two files: `src/config.inc`, wherein we update the configuration variable
`CBMC_VERSION`, and `src/libcprover-rust/Cargo.toml`, wherein we update
three files: `src/config.inc`, wherein we update the configuration variable
`CBMC_VERSION`, src/libcprover-rust/Cargo.toml`, wherein we update
the `version` variable to be the same as `CBMC_VERSION` (e.g. set both
to `5.80.0`).
to `5.80.0`), and CHANGELOG.

This is important as it informs the various tools of the current version
of CBMC.
This is important as it informs the various tools of the current version of
CBMC. These changes need to be pushed as a PR. Once that PR is merged into
`develop`, a Git tag of the form `cbmc-<version>` (where `<version>` is the
value of `CBMC_VERSION`) is automatically created. This tag then triggers
further automatic steps, see below.

(This needs to be pushed as a PR, and after it gets merged we move on to:)

2. Then we make a `git tag` out of that commit, and push it to github. The
tag needs to be of the form `cbmc-<version>` with version being a version
number of the form of `x.y.z`, with `x` denoting the major version, `y`
denoting the minor version, and `z` identifying the patch version (useful
for a hotfix or patch.)

3. Pushing the Rust crate, which is documented [here](https://doc.rust-lang.org/cargo/commands/cargo-publish.html)
2. Pushing the Rust crate, which is documented [here](https://doc.rust-lang.org/cargo/commands/cargo-publish.html)
but effectively entails logging in with an API token generated from
https://crates.io with `cargo login`, and then issuing `cargo publish`.

Expand Down
Loading