Skip to content

Commit 0a3376e

Browse files
Merge pull request #242 from abhinaba-ghosh/feat/add-changelog
Feat/add change log generation
2 parents e159b88 + 7f0fc8f commit 0a3376e

File tree

5 files changed

+1910
-115
lines changed

5 files changed

+1910
-115
lines changed

.github/workflows/npm-release.yml

Lines changed: 53 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,55 +4,82 @@ on:
44
workflow_dispatch:
55
inputs:
66
versionType:
7-
description: 'Version type (major, minor, patch)'
7+
description: 'Version type (major, minor, patch, or auto)'
88
required: true
9-
default: 'patch'
10-
branches:
11-
- master
9+
default: 'auto'
10+
type: choice
11+
options:
12+
- auto
13+
- patch
14+
- minor
15+
- major
1216

1317
jobs:
1418
npm-release:
1519
if: github.ref == 'refs/heads/master'
1620
runs-on: ubuntu-latest
1721
steps:
1822
- name: Checkout code
19-
uses: actions/checkout@v2
23+
uses: actions/checkout@v4
2024
with:
21-
fetch-depth: 0 # fetch all history so that we can determine the version bump
22-
25+
fetch-depth: 0
26+
token: ${{ secrets.GITHUB_TOKEN }}
27+
2328
- name: Configure Git
2429
run: |
25-
git config --global user.name "${{ secrets.GIT_USER_NAME }}"
26-
git config --global user.email "${{ secrets.GIT_USER_EMAIL }}"
30+
git config --global user.name "github-actions[bot]"
31+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
2732
2833
- name: Setup Node.js
29-
uses: actions/setup-node@v2
34+
uses: actions/setup-node@v4
3035
with:
31-
node-version: '16'
36+
node-version: '18'
3237
registry-url: 'https://registry.npmjs.org/'
38+
cache: 'npm'
3339

3440
- name: Install dependencies
35-
run: npm install
41+
run: npm ci
3642

37-
# - name: Run Tests
38-
# run: |
39-
# npx playwright install --with-deps chromium
40-
# npm test
43+
- name: Run tests
44+
run: |
45+
npx playwright install --with-deps chromium
46+
npm test
4147
4248
- name: Build the package
4349
run: npm run build
44-
45-
- name: Bump version
46-
run: npm version ${{ github.event.inputs.versionType }} -m "Upgrade to %s"
47-
50+
51+
- name: Release (auto-determine version)
52+
if: github.event.inputs.versionType == 'auto'
53+
run: npm run release
54+
55+
- name: Release (specific version)
56+
if: github.event.inputs.versionType != 'auto'
57+
run: npm run release:${{ github.event.inputs.versionType }}
58+
4859
- name: Publish to npm
49-
run: npm publish
60+
run: npm run publish:npm
5061
env:
5162
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
5263

5364
- name: Push changes and tags
54-
run: |
55-
git config user.name "${{ secrets.GIT_USER_NAME }}"
56-
git config user.email "${{ secrets.GIT_USER_EMAIL }}"
57-
git push
58-
git push --tags
65+
run: git push --follow-tags origin master
66+
67+
- name: Get version for GitHub release
68+
id: version
69+
run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
70+
71+
- name: Create GitHub Release
72+
uses: actions/create-release@v1
73+
env:
74+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
75+
with:
76+
tag_name: v${{ steps.version.outputs.version }}
77+
release_name: Release v${{ steps.version.outputs.version }}
78+
body: |
79+
## What's Changed
80+
81+
See [CHANGELOG.md](https://github.com/abhinaba-ghosh/axe-playwright/blob/v${{ steps.version.outputs.version }}/CHANGELOG.md) for detailed changes.
82+
83+
**Full Changelog**: https://github.com/abhinaba-ghosh/axe-playwright/blob/v${{ steps.version.outputs.version }}/CHANGELOG.md
84+
draft: false
85+
prerelease: false

CHANGELOG.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4+
5+
## [2.2.0-0](https://github.com/abhinaba-ghosh/axe-playwright/compare/v2.1.0...v2.2.0-0) (2025-08-25)
6+
7+
8+
### Features
9+
10+
* added chnagelog ([2f20011](https://github.com/abhinaba-ghosh/axe-playwright/commit/2f2001164befa5bb708e694242e1b76212f211ce))
11+
12+
13+
### Bug Fixes
14+
15+
* change reporter conditionals in `checkA11y()` to fix `skipFailure` options not working when reporter is 'junit' ([b4514d0](https://github.com/abhinaba-ghosh/axe-playwright/commit/b4514d043ed747ab7079241f3dbb3670e12ce2f0))
16+
17+
## [2.1.0] - 2024-08-25
18+
19+
### Features
20+
21+
* **reporter**: add junit xml reporter for test results
22+
* **reporter**: add html reporter with custom output paths
23+
* **reporter**: enhance terminal reporter v2 with colored output
24+
* **core**: add support for multiple accessibility standards (WCAG21AA, WCAG22AA, etc.)
25+
* **config**: add verbose mode configuration for all reporters
26+
27+
### Bug Fixes
28+
29+
* **core**: improve error handling and reporting
30+
* **types**: enhance TypeScript interfaces and type definitions
31+
* **utils**: fix various edge cases in violation processing
32+
33+
### Performance Improvements
34+
35+
* **core**: optimize axe injection and execution
36+
* **reporter**: improve report generation performance
37+
38+
### Documentation
39+
40+
* **readme**: update examples and usage documentation
41+
* **changelog**: add automated changelog generation

commitlintrc.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"extends": ["@commitlint/config-conventional"],
3+
"rules": {
4+
"type-enum": [
5+
2,
6+
"always",
7+
[
8+
"feat",
9+
"fix",
10+
"docs",
11+
"style",
12+
"refactor",
13+
"perf",
14+
"test",
15+
"build",
16+
"ci",
17+
"chore",
18+
"revert"
19+
]
20+
],
21+
"subject-case": [2, "never", ["sentence-case", "start-case", "pascal-case", "upper-case"]],
22+
"subject-empty": [2, "never"],
23+
"subject-full-stop": [2, "never", "."],
24+
"type-empty": [2, "never"]
25+
}
26+
}

0 commit comments

Comments
 (0)