-
Notifications
You must be signed in to change notification settings - Fork 274
Add an action to perform automatic releases #5456
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
Add an action to perform automatic releases #5456
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This action automatically does the following every thursday at 9:00 AM: * Create a commit that increments the last number of CBMC_VERSION in src/config.inc * Perform a release tagged with the new CBMC_VERSION number This only saves us a tiny bit of work right now, but we’ll add actions to automatically create and upload binary artifacts for these releases soon.
1242284
to
fbdd9c0
Compare
Codecov Report
@@ Coverage Diff @@
## develop #5456 +/- ##
========================================
Coverage 68.23% 68.23%
========================================
Files 1178 1178
Lines 97588 97588
========================================
Hits 66589 66589
Misses 30999 30999
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
- name: Update CBMC version | ||
run: | | ||
sed -i "s/CBMC_VERSION = .*/CBMC_VERSION = $CBMC_VERSION/" src/config.inc | ||
- name: Set git identity to github bot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this name still valid after the change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
err, no I need to update the name of this step.
edit github bot is probably the right name for this
- cron: '0 9 * * THU' | ||
# ^ this means 9:00 AM every thursday | ||
# I can’t figure out the right syntax | ||
# for ‘every other thursday’ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually having looked into this a bit more I don't think there is a right syntax for "every other thursday". The cron syntax we have available here is very limited (see: https://crontab.guru/#0_9_*_*_THU)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I don't think Cron syntax supports that - best you can probably do is to run this job every thursday, and then in the job check if it's a release Thursday or not (and short circuit if its not). Might want to think about timezones as well?
echo "::set-output name=bump_git_sha::$(git rev-parse HEAD)" | ||
- name: Push changes | ||
run: | | ||
git push |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❔ Which branch is this pushing to? Might be nice to have a comment with the answer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We didn’t specify a branch in checkout
, so we pull from the default (develop
), which automatically also sets the upstream of the branch to develop
. So this will push against develop.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this mostly looks fine. If I'm reading this correctly, this looks like it directly commits to develop
? If so, does this create a risk that we might tag a build as a 'release' when it's actually failing CI due to a previous bad merge?
- cron: '0 9 * * THU' | ||
# ^ this means 9:00 AM every thursday | ||
# I can’t figure out the right syntax | ||
# for ‘every other thursday’ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I don't think Cron syntax supports that - best you can probably do is to run this job every thursday, and then in the job check if it's a release Thursday or not (and short circuit if its not). Might want to think about timezones as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed offline with @hannes-steffenhagen-diffblue - happy for this to go in as is.
This action automatically does the following every thursday at 9:00 AM:
in src/config.inc
This only saves us a tiny bit of work right now, but we’ll add actions to
automatically create and upload binary artifacts for these releases soon.
Depends on #5454 because that sets the
CBMC_VERSION
to what this script expects.