Improvement: updating release.yml to include contents of CHANGELOG #13
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PR Title Check | |
on: | |
pull_request: | |
types: [opened, edited, synchronize, reopened] | |
jobs: | |
check-pr-title: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Nushell | |
uses: hustcer/setup-nu@v3 | |
with: | |
version: 0.94.1 | |
- name: Check PR Title | |
env: | |
PR_TITLE: ${{ github.event.pull_request.title }} | |
run: | | |
nu -c ' | |
let title = $env.PR_TITLE | |
let titles = [Fix, Feature, Improvement, Documentation] | |
let type = $title | parse "{Type}:{Title}" | get Type.0 | str trim | |
if ($type in $titles) { | |
print "PR title is correctly formatted." | |
exit 0 | |
} else { | |
print "PR title does not match the required format. It should start with one of: Fix:, Feature:, Documentation:, or Improvement:" | |
exit 1 | |
} | |
' |