Skip to content

Commit

Permalink
chore: semantic-release
Browse files Browse the repository at this point in the history
  • Loading branch information
abernier committed Jun 13, 2023
1 parent 62ff048 commit 0b4c3e8
Show file tree
Hide file tree
Showing 4 changed files with 3,100 additions and 40 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: release
on:
push:
branches:
- 'main'

# Cancel any previous run (see: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency)
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
release-job:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: 'yarn'
- id: main
run: |
yarn install
yarn build
yarn release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "suspend-react",
"version": "0.1.0",
"version": "0.0.0-semantic-release",
"description": "Integrate React Suspense into your apps",
"main": "dist/index.cjs.js",
"module": "dist/index.js",
Expand Down Expand Up @@ -28,8 +28,9 @@
},
"scripts": {
"build": "rollup -c",
"postbuild": "tsc --emitDeclarationOnly",
"prepublishOnly": "npm run build",
"postbuild": "tsc --emitDeclarationOnly && npm run copy",
"copy": "copyfiles package.json README.md LICENSE dist && json -I -f dist/package.json -e \"this.private=false; this.devDependencies=undefined; this.optionalDependencies=undefined; this.scripts=undefined; this.husky=undefined; this.prettier=undefined; this.jest=undefined; this['lint-staged']=undefined;\"",
"release": "semantic-release",
"test": "echo no tests yet"
},
"devDependencies": {
Expand All @@ -51,6 +52,7 @@
"@types/react-test-renderer": "^17.0.1",
"@typescript-eslint/eslint-plugin": "^5.3.0",
"@typescript-eslint/parser": "^5.3.0",
"copyfiles": "^2.4.1",
"eslint": "^8.1.0",
"eslint-config-prettier": "^8.3.0",
"eslint-import-resolver-alias": "^1.1.2",
Expand All @@ -60,12 +62,14 @@
"eslint-plugin-react": "^7.26.1",
"eslint-plugin-react-hooks": "^4.2.0",
"husky": "^7.0.4",
"json": "^11.0.0",
"lint-staged": "^11.2.6",
"prettier": "^2.4.1",
"react": "^17.0.1",
"rollup": "^2.59.0",
"rollup-plugin-size-snapshot": "^0.12.0",
"rollup-plugin-terser": "^7.0.2",
"semantic-release": "^21.0.5",
"typescript": "^4.4.4"
},
"peerDependencies": {
Expand Down
15 changes: 15 additions & 0 deletions release.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module.exports = {
branches: ['main'],
plugins: [
// https://github.com/semantic-release/semantic-release/blob/master/docs/extending/plugins-list.md
'@semantic-release/commit-analyzer',
'@semantic-release/release-notes-generator',
'@semantic-release/github',
[
'@semantic-release/npm',
{
pkgRoot: './dist',
},
],
],
}
Loading

0 comments on commit 0b4c3e8

Please sign in to comment.