-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: set up coverage, add the release and lint PR title workflows (#11)
- Loading branch information
1 parent
f35252b
commit 43e7e25
Showing
6 changed files
with
105 additions
and
5 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
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,18 @@ | ||
name: lint-pr-title | ||
|
||
on: | ||
pull_request_target: | ||
types: | ||
- opened | ||
- reopened | ||
- edited | ||
- synchronize | ||
|
||
jobs: | ||
main: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: amannn/action-semantic-pull-request@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_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,52 @@ | ||
name: Release | ||
run-name: Release ${{ github.event.inputs.version }} version | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
type: choice | ||
description: Version | ||
options: | ||
- patch | ||
- minor | ||
- major | ||
|
||
jobs: | ||
publish-npm: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
cache: yarn | ||
registry-url: https://registry.npmjs.org/ | ||
|
||
- name: Install the latest version of the npm CLI | ||
run: npm install -g npm@latest | ||
|
||
- name: Install dependencies and build | ||
run: | | ||
yarn install | ||
yarn build | ||
- name: Install release-it globally | ||
run: | | ||
npm i -g release-it | ||
npm i -g @release-it/keep-a-changelog | ||
- name: git config | ||
run: | | ||
git config user.name "${GITHUB_ACTOR}" | ||
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | ||
- name: npm config | ||
run: npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }} | ||
|
||
- name: Bump version | ||
run: npx release-it --increment ${{ github.event.inputs.version }} --ci -V | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_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,22 @@ | ||
{ | ||
"git": { | ||
"push": true, | ||
"commit": true, | ||
"commitMessage": "chore: version ${version} [skip ci]", | ||
"requireBranch": "main", | ||
"tag": true | ||
}, | ||
"github": { | ||
"release": true, | ||
"autoGenerate": true, | ||
"releaseName": "${version}" | ||
}, | ||
"npm": { | ||
"publish": true | ||
}, | ||
"plugins": { | ||
"@release-it/keep-a-changelog": { | ||
"filename": "CHANGELOG.md" | ||
} | ||
} | ||
} |
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,4 @@ | ||
# Change Log | ||
|
||
All notable changes to this project will be documented in this file. | ||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. |
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 |
---|---|---|
|
@@ -48,5 +48,8 @@ | |
"engines": { | ||
"node": "16.x" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"license": "MIT" | ||
} |