last try #25
Workflow file for this run
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: Build and Publish | |
on: | |
push: | |
branches: [ "task40" ] # This should be the branch you merge into | |
jobs: | |
build-and-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: '0' | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '3.8' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install bumpversion build twine | |
- name: Configure Git user | |
run: | | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
- name: Bump patch version | |
run: bumpversion --verbose patch | |
- name: Push changes | |
run: | | |
git push --quiet https://${{ secrets.GH_PAT }}@github.com/${{ github.repository }} HEAD:${{ github.ref }} | |
git push --tags --quiet https://${{ secrets.GH_PAT }}@github.com/${{ github.repository }} HEAD:${{ github.ref }} | |
env: | |
GH_PAT: ${{ secrets.GH_PAT }} | |
- name: Build Package | |
run: | | |
./build.sh | |
- name: Publish Package | |
env: | |
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }} | |
run: | | |
twine upload dist/* --verbose --non-interactive --repository testpypi --username __token__ --password $PYPI_API_TOKEN |