@@ -26,38 +26,59 @@ jobs:
26
26
uses : actions/setup-node@v4
27
27
with :
28
28
node-version : 20
29
+ registry-url : ' https://registry.npmjs.org'
29
30
30
31
- name : Install dependencies
31
32
run : pnpm i
32
33
33
34
- name : Run Tests
34
- run : pnpm run lib: test
35
+ run : pnpm run --filter react-plock test
35
36
36
37
- name : Build
37
- run : pnpm run lib: build
38
+ run : pnpm run --filter react-plock build
38
39
39
40
- name : Copy README
40
41
run : cp README.md libs/react-plock/dist/
41
42
42
43
- name : Manual Release
43
44
env :
44
45
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
45
- NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
46
+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
46
47
VERSION : ${{ inputs.version }}
47
48
run : |
48
49
git config --global user.email "github-actions[bot]@users.noreply.github.com"
49
50
git config --global user.name "github-actions[bot]"
50
- npm version $VERSION
51
+
52
+ # Change directory to the package
53
+ cd libs/react-plock
54
+
55
+ # Update version in package.json
56
+ npm version $VERSION --no-git-tag-version
57
+
58
+ # Return to root
59
+ cd ../../
60
+
61
+ # Commit the version change
62
+ git add .
63
+ git commit -m "chore: release v${VERSION}"
64
+ git tag "v${VERSION}"
65
+
66
+ # Publish to npm
51
67
pnpm --filter react-plock publish
52
68
53
69
- name : Generate Changelog
54
70
id : changelog
55
71
run : |
56
72
PREVIOUS_TAG=$(git describe --tags --abbrev=0 HEAD^)
57
- CHANGELOG=$(git log --pretty=format:"- %s" ${PREVIOUS_TAG}..HEAD)
58
- echo "CHANGELOG<<EOF" >> $GITHUB_ENV
59
- echo "$CHANGELOG" >> $GITHUB_ENV
60
- echo "EOF" >> $GITHUB_ENV
73
+ REPO="${GITHUB_REPOSITORY}"
74
+ {
75
+ echo "CHANGELOG<<EOF"
76
+ echo "# Changelog"
77
+ echo ""
78
+ git log --pretty=format:"- %s (${REPO}@%h)" ${PREVIOUS_TAG}..HEAD
79
+ echo ""
80
+ echo "EOF"
81
+ } >> $GITHUB_ENV
61
82
62
83
- name : Create GitHub Release
63
84
uses : actions/create-release@v1
0 commit comments