Skip to content

Commit

Permalink
fix(infra-workflow): init
Browse files Browse the repository at this point in the history
  • Loading branch information
jingsu96 committed Oct 7, 2023
1 parent 1d76ae7 commit 62b2937
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/version.yml
Expand Up @@ -30,6 +30,9 @@ jobs:
- name: Setup
run: pnpm run setup

- name: Setup git user
run: pnpm run setup-git

- name: Publish to npm
id: changesets
uses: changesets/action@v1
Expand Down
2 changes: 2 additions & 0 deletions package.json
Expand Up @@ -16,6 +16,7 @@
"release": "changeset publish",
"storybook": "storybook dev -p 6009",
"setup": "rm -rf node_modules packages/*/node_modules && pnpm install && pnpm build:packages",
"setup-git": "tsx ./scripts/setupUser.ts",
"test": "jest --passWithNoTests",
"version": "changeset version"
},
Expand All @@ -27,6 +28,7 @@
"private": true,
"packageManager": "pnpm@8.6.12",
"devDependencies": {
"@actions/exec": "^1.1.1",
"@babel/core": "^7.21.8",
"@babel/preset-env": "7.21.5",
"@babel/preset-react": "^7.18.6",
Expand Down
15 changes: 15 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions scripts/setupUser.ts
@@ -0,0 +1,10 @@
import { exec } from '@actions/exec';

const setupUser = async () => {
await exec('git', ['config', 'user.name', '"JingHuangSu1996"']);
await exec('git', ['config', 'user.email', '"jing.tech.tw@gmail.com"']);
};

(async () => {
await setupUser();
})();

0 comments on commit 62b2937

Please sign in to comment.