Skip to content

Commit

Permalink
ci: configure semantic release
Browse files Browse the repository at this point in the history
  • Loading branch information
sblask committed Mar 3, 2024
1 parent 0e3262a commit 00dcbfe
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: release

on:
pull_request:
push:
branches:
- main
- manifest-v3

env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
pre-commit:
uses:
./.github/workflows/pre-commit.yml
release:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.head_ref }}
- uses: actions/setup-node@v4
with:
node-version: latest
- run: npm install
- run: npx commitlint --from HEAD~${{ github.event_name == 'pull_request' && github.event.pull_request.commits || github.event.commits.length }} --to HEAD
- run: npx semantic-release ${{ github.event_name == 'pull_request' && '--dry-run' || '' }}
15 changes: 15 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"branches": [
"main",
{
"name": "manifest-v3",
"prerelease": true
}
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/npm",
"@semantic-release/release-notes-generator"
],
"tagFormat": "${ version }"
}
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
"@commitlint/cli": "^19.0.3",
"@commitlint/config-angular": "^19.0.3",
"@eslint/js": "^8.54.0",
"@semantic-release/exec": "github:semantic-release/exec",
"@stylistic/eslint-plugin-js": "^1.4.0",
"eslint": "^8.54.0",
"semantic-release": "^23.0.2",
"web-ext": "^7.8.0"
},
"name": "webextension-tab-deque",
Expand Down

0 comments on commit 00dcbfe

Please sign in to comment.