2024.07.30 #30
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish | |
on: | |
release: | |
types: [created] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: set up python 3.11 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.11" | |
- name: setup publish env | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install setuptools wheel build twine | |
- name: build and publish | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_PROJECT_TOKEN }} | |
run: | | |
python -m build | |
python -m twine upload dist/* | |
- name: create release branch | |
uses: peterjgrainger/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
branch: ${{ github.event.release.tag_name }} |