55 lines
1.9 KiB
YAML
55 lines
1.9 KiB
YAML
# A workflow to cut a new release candidate (i.e.: .stable_01) on the current
|
|
# release branch.
|
|
#
|
|
# The channel will be automatically determined from the branch name (i.e.: when
|
|
# run on a stable_release/* branch, it will assume it is building a new "stable"
|
|
# channel candidate).
|
|
|
|
name: Cut New Release Candidate
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
compute_channel:
|
|
name: Compute release channel
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
channel: ${{ steps.compute-channel.outputs.channel }}
|
|
steps:
|
|
- name: "Compute release channel"
|
|
id: compute-channel
|
|
run: |
|
|
# Check whether the current branch name starts with "some_release/",
|
|
# and if so, extract the value of "some" into the CHANNEL variable,
|
|
# discarding the rest of the branch name.
|
|
CHANNEL="$(echo $GITHUB_REF_NAME | sed -r 's|^(\w+)_release/.*$|\1|')"
|
|
# If the sed expression doesn't match the input, it will write out the
|
|
# input, unmodified.
|
|
if [[ $CHANNEL == $GITHUB_REF_NAME ]]; then
|
|
echo "::error::Can only create new release candidates on a release branch" && exit 1
|
|
fi
|
|
echo "channel=$CHANNEL" >> $GITHUB_OUTPUT
|
|
shell: bash
|
|
|
|
create_release_candidate:
|
|
name: Create Release Candidate
|
|
uses: ./.github/workflows/create_release.yml
|
|
needs: compute_channel
|
|
with:
|
|
channel: ${{ needs.compute_channel.outputs.channel }}
|
|
secrets: inherit
|
|
|
|
update_channel_versions:
|
|
name: Update channel_versions.json
|
|
needs:
|
|
- create_release_candidate
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Invoke update workflow in channel-versions repository
|
|
uses: peter-evans/repository-dispatch@28959ce8df70de7be546dd1250a005dd32156697 # v4.0.1
|
|
with:
|
|
repository: warpdotdev/channel-versions
|
|
token: ${{ secrets.CHANNEL_VERSIONS_REPOSITORY_DISPATCH_TOKEN }}
|
|
event-type: update-channel-versions
|
|
|