-
Notifications
You must be signed in to change notification settings - Fork 277
Automatically create release tags via GitHub actions #5649
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Create release tag | ||
on: | ||
push: | ||
branches: [ develop ] | ||
|
||
jobs: | ||
create-tag: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: '0' | ||
- name: Compute new tag | ||
uses: anothrNick/[email protected] | ||
id: dry_run | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
DEFAULT_BUMP: none | ||
RELEASE_BRANCHES: develop | ||
VERBOSE: false | ||
DRY_RUN: true | ||
- if: ${{ steps.dry_run.new_tag != "" }} | ||
run: | | ||
v=$(grep ^CBMC_VERSION src/config.inc | perl -p -e 's/^CBMC_VERSION\s*=\s*//') | ||
echo "CBMC_VERSION: $v" | ||
echo "New tag: ${{ steps.dry_run.new_tag }}" | ||
test "cbmc-$v" == ${{ steps.dry_run.new_tag }} | ||
- name: Bump version and push tag | ||
uses: anothrNick/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
DEFAULT_BUMP: none | ||
RELEASE_BRANCHES: develop | ||
VERBOSE: false | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this read the latest version from the existing tags?
Probably something like: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Supposedly the bash script behind this GitHub action does check for existing tags. But it may be worth flipping There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have now added a commit to keep in in |
||
DRY_RUN: true |
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.
Have you checked if the default
GITHUB_TOKEN
has the rights to create a tag? It not being allowed to do some things is something that has bitten me in the past, that's why I’m asking.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.
Good call out. I don't know whether this works, but also I'm not sure how to figure it out other than trying it out? (It seems safe to do so: in the worst case, it does not create a tag, and we'd have to go back to the previous, manual approach.)