Skip to content

Commit

Permalink
Update python-publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
borisbolliet authored Sep 28, 2024
1 parent 34a939e commit a7931fc
Showing 1 changed file with 48 additions and 48 deletions.
96 changes: 48 additions & 48 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,36 +13,36 @@ permissions: # Ensure the workflow has permission to push changes
contents: write # Allow write access for pushing to the repository

jobs:
# bump_version:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout the code
# uses: actions/checkout@v4
# with:
# persist-credentials: true

# - name: Set up Python
# uses: actions/setup-python@v5
# with:
# python-version: "3.x"

# - name: Install bump2version
# run: python -m pip install bump2version

# - name: Bump version (patch)
# run: |
# bump2version patch --current-version $(grep -Eo 'version="[^"]*' setup.py | cut -d'"' -f2) setup.py
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# - name: Commit and push version bump
# run: |
# git config --global user.name "GitHub Actions"
# git config --global user.email "[email protected]"
# git commit -am "Bump version"
# git push
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
bump_version:
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v4
with:
persist-credentials: true

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"

- name: Install bump2version
run: python -m pip install bump2version

- name: Bump version (patch)
run: |
bump2version patch --current-version $(grep -Eo 'version="[^"]*' setup.py | cut -d'"' -f2) setup.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Commit and push version bump
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
git commit -am "Bump version"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build_wheels:
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -105,25 +105,25 @@ jobs:
name: wheels-${{ matrix.os }}-${{ matrix.python-version }}
path: wheelhouse/*.whl

# publish_wheels:
# runs-on: ubuntu-latest
# needs: build_wheels
# if: github.event_name == 'release' && github.event.action == 'published'
publish_wheels:
runs-on: ubuntu-latest
needs: build_wheels
if: github.event_name == 'release' && github.event.action == 'published'

# steps:
# - name: Checkout the code
# uses: actions/checkout@v4
steps:
- name: Checkout the code
uses: actions/checkout@v4

# - name: Download built wheels
# uses: actions/download-artifact@v4
# with:
# name: wheels-*
- name: Download built wheels
uses: actions/download-artifact@v4
with:
name: wheels-*

# - name: Install dependencies for uploading
# run: python -m pip install -U pip twine
- name: Install dependencies for uploading
run: python -m pip install -U pip twine

# - name: Upload wheels to PyPI
# env:
# TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
# TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
# run: twine upload wheelhouse/* dist/*
- name: Upload wheels to PyPI
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: twine upload wheelhouse/* dist/*

0 comments on commit a7931fc

Please sign in to comment.