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 35edffb
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
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
- uses: actions/setup-node@v4
- run: npm install
- run: echo ${{ toJson(github) }}
- run: npx commitlint --from HEAD~${{ github.event_name == 'pull_request' && github.event.pull_request.commits || github.event.commits }} --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 35edffb

Please sign in to comment.