Skip to content

Commit

Permalink
Update version in setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
adriaandotcom authored Oct 25, 2024
1 parent 748e53e commit aa534f0
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,31 @@ jobs:

steps:
- uses: actions/checkout@v4

- name: Extract version from tag
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV

- name: Update version in setup.py
uses: jacobtomlinson/gha-find-replace@v2
with:
find: "version='[0-9]+\\.[0-9]+\\.[0-9]+'"
replace: "version='${{ env.VERSION }}'"
regex: true
include: 'setup.py'

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

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build

- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
Expand Down

0 comments on commit aa534f0

Please sign in to comment.