-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: set up semantic release and GH workflows
- Loading branch information
Showing
4 changed files
with
116 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Release and Publish | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- alpha | ||
- beta | ||
- next | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.x | ||
- name: npm install | ||
run: npm install | ||
|
||
- name: npm lint | ||
run: npm run lint | ||
|
||
- name: npm test | ||
run: npm test | ||
|
||
- name: Typecheck | ||
run: npm run types | ||
|
||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
needs: [test] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.x | ||
- name: npm install | ||
run: npm install | ||
|
||
- name: Generate type definitions | ||
run: npm run types | ||
|
||
- name: npx semantic-release | ||
run: npx semantic-release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Run Lint and Tests | ||
|
||
on: push | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macOS-latest, windows-latest] | ||
node-version: [18.x, 20.x] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: npm install | ||
run: npm install | ||
|
||
- name: npm lint | ||
run: npm run lint | ||
|
||
- name: npm test | ||
run: npm test | ||
|
||
- name: Typecheck | ||
run: npm run types |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
module.exports = { | ||
plugins: [ | ||
'@semantic-release/commit-analyzer', | ||
'@semantic-release/release-notes-generator', | ||
'@semantic-release/changelog', | ||
[ | ||
'@semantic-release/npm', | ||
{ | ||
tarballDir: 'release', | ||
}, | ||
], | ||
[ | ||
'@semantic-release/github', | ||
{ | ||
assets: 'release/*.tgz', | ||
}, | ||
], | ||
'@semantic-release/git', | ||
], | ||
preset: 'angular', | ||
branches: [ | ||
{ name: 'master' }, | ||
{ name: 'alpha', prerelease: true }, | ||
{ name: 'beta', prerelease: true }, | ||
{ name: 'next', prerelease: true }, | ||
], | ||
}; |