Files
pezkuwi-subxt/.github/workflows/release-10_rc-automation.yml
T
Chevdor 220bc559f0 GHA updates and pin (#1768)
* Pin checkout to v3.1.0 and update srtool-actions to v0.6.0

* Pin GHA ruby/setup-ruby to 1.118.0

* Update and pin GHA deps

* Pin all external GHA deps
2022-10-17 14:19:09 +00:00

88 lines
3.5 KiB
YAML

name: Release - RC automation
on:
push:
branches:
- release-v[0-9]+.[0-9]+.[0-9]+
- release-parachains-v[0-9]+
workflow_dispatch:
jobs:
tag_rc:
runs-on: ubuntu-latest
strategy:
matrix:
channel:
- name: 'Cumulus Release Coordination'
room: '!ZrLPsivsytpkdJfVaa:matrix.parity.io'
pre-releases: true
steps:
- name: Checkout sources
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
with:
fetch-depth: 0
- id: compute_tag
name: Compute next rc tag
shell: bash
run: |
# Get last rc tag if exists, else set it to {version}-rc1
version=${GITHUB_REF#refs/heads/release-}
echo "$version"
echo "::set-output name=version::$version"
git tag -l
last_rc=$(git tag -l "$version-rc*" | sort -V | tail -n 1)
if [ -n "$last_rc" ]; then
suffix=$(echo "$last_rc" | grep -Eo '[0-9]+$')
echo $suffix
((suffix++))
echo $suffix
echo "::set-output name=new_tag::$version-rc$suffix"
echo "::set-output name=first_rc::false"
else
echo "::set-output name=new_tag::$version-rc1"
echo "::set-output name=first_rc::true"
fi
- name: Apply new tag
uses: tvdias/github-tagger@ed7350546e3e503b5e942dffd65bc8751a95e49d # v0.0.2
with:
# We can't use the normal GITHUB_TOKEN for the following reason:
# https://docs.github.com/en/actions/reference/events-that-trigger-workflows#triggering-new-workflows-using-a-personal-access-token
# RELEASE_BRANCH_TOKEN requires public_repo OAuth scope
repo-token: "${{ secrets.RELEASE_BRANCH_TOKEN }}"
tag: ${{ steps.compute_tag.outputs.new_tag }}
- id: create-issue-checklist-client
uses: JasonEtco/create-an-issue@9e6213aec58987fa7d2f4deb8b256b99e63107a2 # v2.6.0
# Only create the issue if it's the first release candidate
if: steps.compute_tag.outputs.first_rc == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ steps.compute_tag.outputs.version }}
with:
assignees: release-engineering
filename: .github/ISSUE_TEMPLATE/release-client.md
- id: create-issue-checklist-runtime
uses: JasonEtco/create-an-issue@9e6213aec58987fa7d2f4deb8b256b99e63107a2 # v2.6.0
# Only create the issue if it's the first release candidate
if: steps.compute_tag.outputs.first_rc == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ steps.compute_tag.outputs.version }}
with:
assignees: release-engineering
filename: .github/ISSUE_TEMPLATE/release-runtime.md
- name: Matrix notification to ${{ matrix.channel.name }}
uses: s3krit/matrix-message-action@70ad3fb812ee0e45ff8999d6af11cafad11a6ecf # v0.0.3
if: steps.create-issue-checklist-client.outputs.url != '' && steps.create-issue-checklist-runtime.outputs.url != ''
with:
room_id: ${{ matrix.channel.room }}
access_token: ${{ secrets.MATRIX_ACCESS_TOKEN }}
server: "matrix.parity.io"
message: |
The Release Process for Cumulus ${{ steps.compute_tag.outputs.version }} has been started.
Tracking issues:
- client: ${{ steps.create-issue-checklist-client.outputs.url }}"
- runtime: ${{ steps.create-issue-checklist-runtime.outputs.url }}"