-
Notifications
You must be signed in to change notification settings - Fork 23
43 lines (40 loc) · 1.56 KB
/
tag.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Tag a new release using https://github.com/marketplace/actions/conventional-commits-versioner-action
#
# 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 twice a month, on the 1rst and 15th at 3PM UTC (8AM PST)
# 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 1,15 * *"
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@7318e2f25a52dcd550e75384b84983973251a1f8 # v0.10.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' && needs.tag.outputs.new-tag-version-type != 'major'
permissions:
contents: write # allow create release