-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (32 loc) · 1022 Bytes
/
draft-new-release.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
name: "Draft new release"
on:
push:
branches:
- release/v*.*.*
jobs:
draft-new-release:
name: "Draft new release"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Extract version from branch name
run: |
BRANCH_NAME=${GITHUB_REF#refs/heads/}
VERSION=${BRANCH_NAME#release/}
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
- name: Validate the version
id: regex-match
uses: actions-ecosystem/action-regex-match@v2
with:
text: ${{ env.RELEASE_VERSION }}
regex: '^v\d+(\.\d+){2}$'
- name: Create pull request
if: ${{ steps.regex-match.outputs.match != '' }}
uses: thomaseizinger/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
head: release/${{ env.RELEASE_VERSION }}
base: main
title: Release version ${{ env.RELEASE_VERSION }}
reviewers: ${{ github.actor }}