File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed
Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change 4646 - uses : actions/checkout@v4
4747 with :
4848 fetch-depth : 0
49- persist-credentials : false
49+ token : ${{ secrets.GITHUB_TOKEN }}
5050 - name : Setup Node.js
5151 uses : actions/setup-node@v4
5252 with :
@@ -55,18 +55,23 @@ jobs:
5555 uses : actions/setup-python@v5
5656 with :
5757 python-version : " 3.12"
58- - name : Install build tools
59- run : pip install build twine
60- - name : Install semantic-release
58+ - name : Install semantic-release plugins
6159 run : npm install -g semantic-release @semantic-release/changelog @semantic-release/git @semantic-release/exec @semantic-release/github
62- - name : Release
60+ - name : Semantic Release
61+ id : release
6362 run : npx semantic-release
6463 env :
6564 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
66- - name : Build
65+ # After semantic-release: re-read the (potentially bumped) pyproject.toml,
66+ # build, and publish to PyPI
67+ - name : Pull latest (version-bumped) commit
68+ run : git pull --ff-only origin main || true
69+ - name : Install build tools
70+ run : pip install build twine
71+ - name : Build package
6772 run : python -m build
6873 - name : Publish to PyPI
6974 env :
7075 TWINE_USERNAME : __token__
7176 TWINE_PASSWORD : ${{ secrets.PYPI_TOKEN }}
72- run : twine upload dist/* || true
77+ run : twine upload dist/* --skip-existing
You can’t perform that action at this time.
0 commit comments