Skip to content

Commit 186ce52

Browse files
committed
chore(mix): change release action
1 parent 9d8ac94 commit 186ce52

5 files changed

Lines changed: 22 additions & 21 deletions

File tree

.github/workflows/release.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
name: Release
22

33
on:
4-
push:
5-
branches:
6-
- main
7-
- dev
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: 'Version to release (e.g., 1.0.0)'
8+
required: true
9+
type: string
810

911
jobs:
1012
release:
@@ -31,11 +33,19 @@ jobs:
3133
- name: Run Tests
3234
run: pnpm run lib:test
3335

34-
- name: Install dependencies
36+
- name: Build
3537
run: pnpm run lib:build
3638

37-
- name: Semantic Release
39+
- name: Copy README
40+
run: cp README.md libs/react-plock/dist/
41+
42+
- name: Manual Release
3843
env:
3944
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4045
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
41-
run: pnpm run lib:release
46+
VERSION: ${{ inputs.version }}
47+
run: |
48+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
49+
git config --global user.name "github-actions[bot]"
50+
npm version $VERSION
51+
pnpm --filter react-plock publish

examples/with-nextjs/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
],
2121
"paths": {
2222
"@/*": ["./src/*"],
23-
"@local/lib": ["../../libs/react-plock/index"],
23+
"@local/lib": ["../../libs/react-plock/src/index"],
2424
"@assets/*": ["../../assets/*"]
2525
}
2626
},

examples/with-vite/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"noEmit": true,
1818
"jsx": "react-jsx",
1919
"paths": {
20-
"@local/lib": ["../../libs/react-plock/index"],
20+
"@local/lib": ["../../libs/react-plock/src/index"],
2121
"@assets/*": ["../../assets/*"]
2222
}
2323
},

libs/react-plock/package.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,9 @@
2121
},
2222
"scripts": {
2323
"test": "vitest run",
24-
"lib:bump": "changelogen --bump",
25-
"lib:bump:dev": "changelogen --bump --prerelease dev",
26-
"lib:publish": "changelogen --publish",
27-
"lib:publish:dev": "npm publish react-plock --tag dev",
28-
"lib:release": "semantic-release",
29-
"build": "vite build"
24+
"build": "vite build",
25+
"lib:publish": "npm publish react-plock",
26+
"lib:publish:dev": "npm publish react-plock --tag dev"
3027
},
3128
"bugs": {
3229
"url": "https://github.com/askides/react-plock/issues"

package.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
{
22
"name": "react-plock-mono",
33
"private": true,
4-
"scripts": {
5-
"lib:test": "pnpm --filter react-plock test",
6-
"lib:build": "pnpm --filter react-plock build",
7-
"lib:release": "pnpm --filter react-plock lib:release",
8-
"demo:build": "pnpm --filter with-vite build"
9-
},
104
"devDependencies": {
115
"@types/node": "^18.14.4",
126
"@types/react": "^18.2.0",

0 commit comments

Comments
 (0)