diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index bf1edd3..49ee29d 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -5,7 +5,7 @@ on: branches: - main paths: - - '/docs/**' + - 'docs/**' workflow_dispatch: permissions: diff --git a/.github/workflows/pr-title.yml b/.github/workflows/pr-title.yml new file mode 100644 index 0000000..cf89274 --- /dev/null +++ b/.github/workflows/pr-title.yml @@ -0,0 +1,18 @@ +name: Conventional Commits PR Title + +on: + pull_request_target: + types: + - opened + - edited + - synchronize +jobs: + main: + name: Validate PR title + runs-on: ubuntu-latest + steps: + - uses: amannn/action-semantic-pull-request@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + wip: true diff --git a/.github/workflows/release-package.yml b/.github/workflows/release-package.yml index 100d14d..bf834e2 100644 --- a/.github/workflows/release-package.yml +++ b/.github/workflows/release-package.yml @@ -6,7 +6,7 @@ on: - main - next paths: - - '/use-react-workers/**' + - 'use-react-workers/**' workflow_dispatch: permissions: @@ -43,5 +43,5 @@ jobs: with: working_directory: ./use-react-workers env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/commitlint.config.js b/commitlint.config.js index 247dd20..1a2ce1f 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -1,4 +1,5 @@ module.exports = { extends: ['@commitlint/config-conventional'], - ignores: [message => message.startsWith('WIP')], + // ignores [skip ci] so semantic-release can leave long commit messages + ignores: [message => message.startsWith('WIP'), message => /\[skip ci\]/m.test(message)], }; diff --git a/use-react-workers/CHANGELOG.md b/use-react-workers/CHANGELOG.md new file mode 100644 index 0000000..e69de29 diff --git a/use-react-workers/README.md b/use-react-workers/README.md index d9902ca..3336a00 100644 --- a/use-react-workers/README.md +++ b/use-react-workers/README.md @@ -1,5 +1,5 @@

- `use-react-workers` Reacts hooks for Web Workers + use-react-workers Reacts hooks for Web Workers

## 🎨 Features diff --git a/use-react-workers/package.json b/use-react-workers/package.json index d7cac2c..396f50a 100644 --- a/use-react-workers/package.json +++ b/use-react-workers/package.json @@ -21,7 +21,7 @@ "dev": "vite build --watch", "test:types": "tsc --noEmit", "link": "eslint src/ --ext .ts", - "release:dry": "source ../.env && npx semantic-release --dry-run" + "release:dry": "source ../.env && npx semantic-release --dry-run --branches $(git branch --show-current)" }, "dependencies": { "dequal": "^1.0.0" diff --git a/use-react-workers/release.config.cjs b/use-react-workers/release.config.cjs index 3021a5b..dab2e2a 100644 --- a/use-react-workers/release.config.cjs +++ b/use-react-workers/release.config.cjs @@ -15,7 +15,17 @@ module.exports = { '@semantic-release/release-notes-generator', '@semantic-release/github', '@semantic-release/commit-analyzer', - '@semantic-release/git', - '@semantic-release/changelog', + [ + '@semantic-release/git', + { + assets: ['CHANGELOG.md'], + }, + ], + [ + '@semantic-release/changelog', + { + changelogFile: 'CHANGELOG.md', + }, + ], ], };