GH Action: Set new version and publish on push (#961) #265
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 project | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
publish_project: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
- name: install dependencies | |
run: pip install .[ci] | |
- name: install flit | |
run: pip install flit | |
- name: update version or publish | |
env: | |
FLIT_USERNAME: __token__ | |
FLIT_PASSWORD: ${{ secrets.FLIT_PASSWORD }} | |
run: python .github/scripts/handlers/version.py |