Skip to content

Commit

Permalink
build: semantic-release (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpwallace22 authored Jan 1, 2024
1 parent 9a4aeab commit 16b202d
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- main
paths:
- '/docs/**'
- 'docs/**'
workflow_dispatch:

permissions:
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/pr-title.yml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions .github/workflows/release-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- main
- next
paths:
- '/use-react-workers/**'
- 'use-react-workers/**'
workflow_dispatch:

permissions:
Expand Down Expand Up @@ -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 }}
3 changes: 2 additions & 1 deletion commitlint.config.js
Original file line number Diff line number Diff line change
@@ -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)],
};
Empty file added use-react-workers/CHANGELOG.md
Empty file.
2 changes: 1 addition & 1 deletion use-react-workers/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<h1 align="center">
`use-react-workers` Reacts hooks for Web Workers
use-react-workers Reacts hooks for Web Workers
</h1>

## 🎨 Features
Expand Down
2 changes: 1 addition & 1 deletion use-react-workers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
14 changes: 12 additions & 2 deletions use-react-workers/release.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
],
],
};

0 comments on commit 16b202d

Please sign in to comment.