Skip to content

Commit 36f332c

Browse files
committed
force npm package and release mod
1 parent da0d73e commit 36f332c

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

.github/workflows/release.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,22 @@ jobs:
2626
with:
2727
node-version: '20.9.0'
2828

29+
- name: Install npm dev dependencies
30+
run: npm install --only=dev
31+
2932
- name: Get current version
3033
id: current_version
3134
run: |
3235
echo "::set-output name=version::$(python -c 'from __version__ import __version__; print(__version__)')"
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.PAT }}
3338

3439
- name: Get next version
3540
id: next_version
3641
run: |
37-
echo "::set-output name=version::$(npx semantic-release --dry-run | grep 'The next release version is' | cut -d ' ' -f6)"
42+
echo "::set-output name=version::$(npx semantic-release --dry-run | awk '/The next release version is/{print $NF}')"
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.PAT }}
3845

3946
- name: Update __version__
4047
if: steps.current_version.outputs.version != steps.next_version.outputs.version
@@ -43,7 +50,7 @@ jobs:
4350
git config --local user.email "[email protected]"
4451
git config --local user.name "GitHub Action"
4552
git add __version__.py
46-
git commit -m "chore: [gh] Update __version__.py to ${{ steps.next_version.outputs.version }}"
53+
git commit -m "chore: [gh] Update __version__.py to ${{ steps.next_version.outputs.version }} [skip ci]"
4754
git push https://${{ secrets.PAT }}@github.com/${{ github.repository }}.git HEAD:main
4855
env:
4956
GITHUB_TOKEN: ${{ secrets.PAT }}

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"devDependencies": {
3+
"@semantic-release/changelog": "^6.0.3",
4+
"@semantic-release/git": "^10.0.1"
5+
}
6+
}

0 commit comments

Comments
 (0)