Skip to content

chore(deps): update actions/deploy-pages action to v5 #122

chore(deps): update actions/deploy-pages action to v5

chore(deps): update actions/deploy-pages action to v5 #122

Workflow file for this run

name: Create Release on PR Merge
on:
pull_request:
types: [closed]
jobs:
create-release:
if: ${{ github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/v') }}
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check if branch matches pattern
id: check_branch
run: |
if [[ ! "${GITHUB_HEAD_REF}" =~ ^release/v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Branch does not match pattern"
exit 1
fi
- name: Checkout repository
uses: actions/checkout@v7
- name: Read version from pubspec.yaml
id: read_version
run: |
VERSION=$(grep 'version:' pubspec.yaml | tail -n1 | awk '{ print $2}')
VERSION_NAME=${VERSION%+*}
echo "VERSION=v$VERSION_NAME" >> $GITHUB_ENV
- name: Create Release
id: create_release
uses: ncipollo/release-action@v1.21.0
with:
name: Release ${{ env.VERSION }}
tag: ${{ env.VERSION }}
commit: ${{ github.sha }}
generateReleaseNotes: true