Skip to content

Commit

Permalink
feat(DEV-22): setup semantic-release
Browse files Browse the repository at this point in the history
  • Loading branch information
hhimanshu committed Jul 1, 2021
1 parent ecabd36 commit 731427a
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 5 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/release.yml
@@ -0,0 +1,32 @@
name: Release Create React TypeScript Starter
on:
push:
branches:
- master
jobs:
release:
name: Release
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 10

- name: Install deps and build (with cache)
uses: bahmutov/npm-install@v1

- name: Test
run: yarn test --ci --coverage --maxWorkers=2

- name: Build Artifacts
run: yarn build

- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
25 changes: 20 additions & 5 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "create-react-ts-starter",
"version": "1.0.0",
"version": "0.0.0-development",
"description": "A React Starter from scratch using TypeScript, Webpack, Jest, React Testing Library, Storybook, Prettier, ESLint, and GitHub Actions.",
"private": true,
"scripts": {
Expand All @@ -13,11 +13,12 @@
"format": "prettier --write .",
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook",
"start-prod-storybook": "yarn build-storybook && npx -y serve storybook-static -l 5858"
"start-prod-storybook": "yarn build-storybook && npx -y serve storybook-static -l 5858",
"semantic-release": "semantic-release"
},
"repository": {
"type": "git",
"url": " https://github.com/hhimanshu/create-react-ts-starter"
"url": "https://github.com/hhimanshu/create-react-ts-starter"
},
"keywords": [],
"author": "Harit Himanshu",
Expand Down Expand Up @@ -57,10 +58,24 @@
"webpack": "^5.22.0",
"webpack-cli": "^4.5.0",
"webpack-dev-server": "^3.11.2",
"webpack-merge": "^5.7.3"
"webpack-merge": "^5.7.3",
"semantic-release": "^17.4.4"
},
"dependencies": {
"react": "^17.0.1",
"react-dom": "^17.0.1"
}
},
"release": {
"branches": [
"main"
]
},
"plugins": [
[
"@semantic-release/npm",
{
"npmPublish": false
}
]
]
}

0 comments on commit 731427a

Please sign in to comment.