@@ -10,11 +10,38 @@ jobs:
1010 release :
1111 runs-on : ubuntu-latest
1212 steps :
13- - uses : actions/checkout@v3
14- - uses : actions/setup-python@v3
13+ - name : 📥 Checkout code
14+ uses : actions/checkout@v3
15+ with :
16+ fetch-depth : 0
17+ ref : ${{ github.event.release.target_commitish }}
18+ token : ${{ secrets.GITHUB_TOKEN }}
19+
20+ - name : 🐍 Setup Python
21+ uses : actions/setup-python@v3
1522 with :
1623 python-version : ' 3.9'
1724 architecture : x64
18- - run : pip install poetry==1.3.1
19- - run : poetry build
20- - run : poetry publish --username=__token__ --password=${{ secrets.PYPI_TOKEN }}
25+
26+ - name : 📦 Install Poetry
27+ run : pip install poetry==1.3.1
28+
29+ - name : 🔧 Configure git
30+ run : |
31+ git config user.name "github-actions[bot]"
32+ git config user.email "github-actions[bot]@users.noreply.github.com"
33+
34+ - name : 🚀 Bump version, commit, and push
35+ run : |
36+ poetry version ${{ github.ref_name }}
37+ git add pyproject.toml
38+ git commit -m "chore(release): version ${{ github.ref_name }}"
39+ git tag -f ${{ github.ref_name }} HEAD
40+ git push origin ${{ github.event.release.target_commitish }}
41+ git push -f origin refs/tags/${{ github.ref_name }}
42+
43+ - name : 📦 Build package
44+ run : poetry build
45+
46+ - name : 🚀 Publish to PyPI
47+ run : poetry publish --username=__token__ --password=${{ secrets.PYPI_TOKEN }}
0 commit comments