Improve release process (#126)

Fixes #125
This commit is contained in:
Pierre Jacquier
2023-04-26 20:11:14 -04:00
committed by GitHub
parent 402b3f579c
commit 061b1f3f2a
3 changed files with 16 additions and 17 deletions

View File

@ -25,22 +25,6 @@ jobs:
- run: yarn install
- name: Set release version to .json files and commit to main
if: github.event_name == 'release'
env:
BRANCH: main
run: |
git fetch origin
git checkout $BRANCH
echo "$(jq --arg v "${RELEASE#v}" '.version=$v' package.json --indent 4)" > package.json
echo "$(jq --arg v "${RELEASE#v}" '.version=$v' public/manifest.json --indent 4)" > public/manifest.json
git diff
git add .
git config user.name github-actions
git config user.email github-actions@github.com
git commit -m "Align versions with $RELEASE"
git push origin $BRANCH
- run: yarn build
- run: yarn test

View File

@ -48,3 +48,17 @@ If you arent satisfied with the build tool and configuration choices, you can
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point youre on your own.
You dont have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldnt feel obligated to use this feature. However we understand that this tool wouldnt be useful if you couldnt customize it when you are ready for it.
## Release a new version
1. Bump the versions in the source code by creating a new PR, committing the changes from
```bash
VERSION=x.y.z npm run bump
```
2. Merge the PR
3. Create a new release and tag pointing to the bump version commit using semantic versioning `v{x}.{y}.{z}`
A new Action should run, uploading artifacts to the release itself and to the Chrome Web Store at https://chrome.google.com/webstore/detail/kittycad-diff-viewer/gccpihmphokfjpohkmkbimnhhnlpmegp

View File

@ -37,7 +37,8 @@
"build": "INLINE_RUNTIME_CHUNK=false craco build",
"test": "react-scripts test",
"e2e": "yarn build && yarn playwright test",
"eject": "react-scripts eject"
"eject": "react-scripts eject",
"bump": "echo \"$(jq --arg v \"$VERSION\" '.version=$v' package.json --indent 4)\" > package.json && echo \"$(jq --arg v \"$VERSION\" '.version=$v' public/manifest.json --indent 4)\" > public/manifest.json"
},
"eslintConfig": {
"extends": [