Skip to content

Prepare Release 1.1.1 #10

Prepare Release 1.1.1

Prepare Release 1.1.1 #10

Workflow file for this run

name: Create Draft Release
on:
pull_request:
types: [closed]
jobs:
create-draft-release:
if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release/')
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Extract version from branch name
run: |
if [[ "${{ github.event.pull_request.head.ref }}" =~ ^release/(.+)$ ]]; then
VERSION="${BASH_REMATCH[1]}"
echo "VERSION=${VERSION}" >> $GITHUB_ENV
else
echo "Branch name does not match 'release/' pattern"
exit 1
fi
- name: Create Tag
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git tag $VERSION
git push origin $VERSION
- name: Create Draft Release
uses: ncipollo/release-action@v1
with:
tag: ${{ env.VERSION }}
name: "v${{ env.VERSION }}"
commitish: main
generate_release_notes: true
draft: true
token: ${{ secrets.GITHUB_TOKEN }}