diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml index a491cd6..52482d9 100644 --- a/.github/workflows/label.yml +++ b/.github/workflows/label.yml @@ -9,7 +9,7 @@ on: jobs: check-commit-message: - name: Check Commit Message + name: Create label from comment runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -17,8 +17,13 @@ jobs: - uses: actions-ecosystem/action-regex-match@v2 id: regex-match with: - text: ${{ github.event.comment.body }} - regex: '^/label\s*(.*?)\s*$' + text: ${{ github.event.pull_request.body }} + regex: '^.*\/label\s(.*)(\s.*)?$' + + - name: Dump match + run: | + echo '${{ steps.regex-match.outputs.match }}' + echo '${{ steps.regex-match.outputs.group1 }}' - uses: actions-ecosystem/action-add-labels@v1 if: ${{ steps.regex-match.outputs.match != '' }} diff --git a/.github/workflows/semantic.yml b/.github/workflows/semantic.yml index 6063260..32a3e59 100644 --- a/.github/workflows/semantic.yml +++ b/.github/workflows/semantic.yml @@ -15,5 +15,22 @@ jobs: - name: PR Title Verify uses: satvik-s/pr-title-check@1.1.0 with: - #pattern: '^(fix|feat|chore|doc|style|refactor|perf|revert|test): (?:\w+\b\W*){2,8}$' - pattern: '^((fix|feat|refactor)(\(\w\))?: (\w+\s){2,8}(\[[A-Z]{2,3}-[0-9]*\]))|((revert|chore|doc|style|perf|test)(\(\w\))?: ([\w ()-]+)(\[[A-Z]{2,3}-[0-9]*\])?( \(SKIP-RELEASE\))?)$' + pattern: '^(feat|chore|doc|fix|security|refactor|test|wip):[ ]?.{3,}$' + + - name: Check Body + id: check-body + uses: actions-ecosystem/action-regex-match@v2 + with: + text: ${{ github.event.pull_request.body }} + regex: '^.*(TEST).*$' + + - name: Dump match + run: | + echo '${{ steps.check-body.outputs.match }}' + + - name: Comment + if: ${{ steps.check-body.outputs.match == '' }} + uses: thollander/actions-comment-pull-request@v2 + with: + message: | + This is a test ! :wave: diff --git a/README.md b/README.md index 2236183..c497217 100644 --- a/README.md +++ b/README.md @@ -80,4 +80,5 @@ Dummy demonstration http server. * [X] Fix auto tag (no actual analyse of PRs) * [X] Fix changelog (fix are uncategorized) * [X] Create and commit SVG badge in pushed branch +* [X] Automated versioning and fancy changelogs * [ ] Create pre-releases / drafts by default