@@ -26,38 +26,59 @@ jobs:
2626 uses : actions/setup-node@v4
2727 with :
2828 node-version : 20
29+ registry-url : ' https://registry.npmjs.org'
2930
3031 - name : Install dependencies
3132 run : pnpm i
3233
3334 - name : Run Tests
34- run : pnpm run lib: test
35+ run : pnpm run --filter react-plock test
3536
3637 - name : Build
37- run : pnpm run lib: build
38+ run : pnpm run --filter react-plock build
3839
3940 - name : Copy README
4041 run : cp README.md libs/react-plock/dist/
4142
4243 - name : Manual Release
4344 env :
4445 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
45- NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
46+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
4647 VERSION : ${{ inputs.version }}
4748 run : |
4849 git config --global user.email "github-actions[bot]@users.noreply.github.com"
4950 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
5167 pnpm --filter react-plock publish
5268
5369 - name : Generate Changelog
5470 id : changelog
5571 run : |
5672 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
6182
6283 - name : Create GitHub Release
6384 uses : actions/create-release@v1
0 commit comments