Tag a Release #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Tag a new release | |
# This is easier than having to run manual `git` operations on a local clone. | |
# It also runs on a schedule so we don't leave commits unreleased indefinitely | |
# (avoiding users having to ping "hey could someone cut a release"). | |
name: Tag a Release | |
on: | |
# Allow devs to tag manually through the GitHub UI. | |
# For example after landing a fix that customers are waiting for. | |
workflow_dispatch: | |
# Run at 3PM UTC (8AM PST) on the 3rd and 18th of each month. | |
# This is a trade-off between making too many releases, | |
# which overwhelms BCR maintainers and over-notifies users, | |
# and releasing too infrequently which delays delivery of bugfixes and features. | |
schedule: | |
- cron: "0 15 3,18 * *" | |
jobs: | |
tag: | |
permissions: | |
contents: write # allow create tag | |
runs-on: ubuntu-latest | |
outputs: | |
new-tag: ${{ steps.ccv.outputs.new-tag }} | |
new-tag-version: ${{steps.ccv.outputs.new-tag-version}} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
# Need enough history to find the prior release tag | |
fetch-depth: 0 | |
- name: Bump tag if necessary | |
id: ccv | |
uses: smlx/ccv@d3de774e9b607b079940a7a86952f44643743336 # v0.9.0 | |
release: | |
needs: tag | |
uses: ./.github/workflows/release.yml | |
with: | |
tag_name: ${{ needs.tag.outputs.new-tag-version }} | |
if: needs.tag.outputs.new-tag == 'true' | |
permissions: | |
contents: write # allow create release |