-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add semantic-release * feat: add release and package workflows
- Loading branch information
Showing
12 changed files
with
25,747 additions
and
13,437 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 @@ | ||
local_tests |
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,43 @@ | ||
name: Package | ||
|
||
on: | ||
# release: | ||
# types: [published] | ||
# support manual release in case something goes wrong and needs to be repeated or tested | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
description: tag that needs to publish | ||
type: string | ||
required: true | ||
|
||
env: | ||
NODE_VERSION: 18 | ||
|
||
jobs: | ||
pack: | ||
name: Package Extension | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{env.NODE_VERSION}} | ||
cache: 'npm' | ||
|
||
- name: NPM Install | ||
run: npm ci | ||
|
||
- run: npm run build | ||
|
||
- name: Attach artifacts to release | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: './zip/*.zip' | ||
file_glob: true | ||
overwrite: true | ||
tag: ${{ github.event.release.tag_name || inputs.tag }} |
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,63 @@ | ||
name: 'Release' | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
|
||
env: | ||
NODE_VERSION: 18 | ||
|
||
jobs: | ||
build-test: | ||
name: Build and Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Clone Repo | ||
uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{env.NODE_VERSION}} | ||
cache: 'npm' | ||
|
||
- name: NPM Install | ||
run: npm ci | ||
|
||
- name: NPM Lint | ||
run: npm run lint | ||
|
||
- name: NPM Build | ||
run: npm run build --if-present | ||
|
||
- name: NPM Test | ||
run: npm run test --if-present | ||
|
||
newRelease: | ||
name: Create New Release | ||
needs: [build-test] | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
issues: write | ||
pull-requests: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{env.NODE_VERSION}} | ||
cache: 'npm' | ||
|
||
- name: NPM Install | ||
run: npm ci | ||
|
||
- name: NPM Build | ||
run: npm run build --if-present | ||
|
||
- name: Release | ||
run: npm run release | ||
env: | ||
GITHUB_TOKEN: ${{secrets.GLOBAL_GITHUB_TOKEN}} | ||
NPM_TOKEN: ${{secrets.NPM_TOKEN}} | ||
CI: true |
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 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx --no-install commitlint --edit "$1" |
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 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx lint-staged |
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,5 @@ | ||
{ | ||
"src/**/*.{ts,js,json,md,html,css,scss}": [ | ||
"npm run lint" | ||
] | ||
} |
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,64 @@ | ||
{ | ||
"branches": [ | ||
"main" | ||
], | ||
"plugins": [ | ||
[ | ||
"@semantic-release/commit-analyzer", | ||
{ | ||
"preset": "conventionalcommits", | ||
"releaseRules": [ | ||
{ | ||
"type": "docs", | ||
"scope": "README", | ||
"release": "patch" | ||
}, | ||
{ | ||
"type": "refactor", | ||
"release": "patch" | ||
}, | ||
{ | ||
"type": "style", | ||
"release": "patch" | ||
} | ||
], | ||
"parserOpts": { | ||
"noteKeywords": [ | ||
"BREAKING CHANGE", | ||
"BREAKING CHANGES" | ||
] | ||
} | ||
} | ||
], | ||
[ | ||
"@semantic-release/release-notes-generator", | ||
{ | ||
"preset": "conventionalcommits" | ||
} | ||
], | ||
"@semantic-release/changelog", | ||
[ | ||
"@semantic-release/npm", | ||
{ | ||
"npmPublish": false | ||
} | ||
], | ||
[ | ||
"@semantic-release/github", | ||
{ | ||
"assets": [] | ||
} | ||
], | ||
[ | ||
"@semantic-release/git", | ||
{ | ||
"assets": [ | ||
"package.json", | ||
"package-lock.json", | ||
"CHANGELOG.md" | ||
], | ||
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" | ||
} | ||
] | ||
] | ||
} |
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,3 @@ | ||
|
||
|
||
module.exports = { extends: ['@commitlint/config-conventional'] } |
Oops, something went wrong.