Skip to content

Commit

Permalink
feat: update semantic release process (#326)
Browse files Browse the repository at this point in the history
* feat: update release definition to include docs updates triggering a patch release

* feat: include commitlint in PR to main GHA

* Update GHA titles, filenames

* Ensure manual tests are manual

* Add commitlint config
  • Loading branch information
recalcitrantsupplant authored Jan 13, 2025
1 parent 36f49da commit fbd5e37
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Run tests
name: Manually run Test Suite

on:
push:
# push:
# branches:
# - feature/**
workflow_dispatch:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: Run integration tests
name: "Pull Request Action: Run Tests & Lint PR Title"

on:
pull_request:
types:
- opened
- edited
- synchronize
branches:
- main
workflow_dispatch:
Expand Down Expand Up @@ -58,3 +60,20 @@ jobs:
#----------------------------------------------
- name: Run tests
run: poetry run pytest tests

lint-pr-title:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18

- name: Install Commitlint
run: npm install --global @commitlint/{cli,config-conventional}

- name: Lint PR Title
run: echo "${{ github.event.pull_request.title }}" | commitlint
17 changes: 15 additions & 2 deletions .releaserc.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
plugins:
- '@semantic-release/commit-analyzer':
preset:
"angular"
preset: "angular"
releaseRules:
- type: "feat"
release: "minor"
- type: "fix"
release: "patch"
- type: "perf"
release: "patch"
- type: "docs"
release: "patch"
- type: "revert"
release: "patch"
- breaking: true
release: "major"
- '@semantic-release/release-notes-generator'
- '@semantic-release/changelog'
- '@semantic-release/github'
1 change: 1 addition & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = { extends: ["@commitlint/config-conventional"] };

0 comments on commit fbd5e37

Please sign in to comment.