Skip to content

Commit

Permalink
Merge pull request #4 from small-thinking/update-gha
Browse files Browse the repository at this point in the history
Update GHA
  • Loading branch information
yxjiang authored Feb 29, 2024
2 parents 5ec4b30 + 0463d1b commit 5a77a8a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/publish_to_pypi.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: Publish Python Package to PyPI

# Trigger the workflow when a tag is pushed with a version starting with 'v'
on:
push:
tags:
Expand All @@ -15,19 +14,28 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
python-version: '3.10'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
# Step name: Build package
- name: Extract version from tag
id: get_version
run: echo "::set-output name=VERSION::${GITHUB_REF#refs/tags/v}"
shell: bash

- name: Echo the package version
run: |
echo "Package version: ${{ steps.get_version.outputs.VERSION }}"
# Assuming setup.py reads the version from a source that is updated to match the tag,
# or you're using a tool to sync them.
- name: Build package
run: |
python setup.py sdist bdist_wheel
# Step name: Publish to PyPI
- name: Publish to PyPI
uses: pypa/[email protected]
with:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

setup(
name="polymind",
version="0.0.1",
version="0.0.3",
packages=find_packages(),
install_requires=requirements,
author="Small Thinking",
Expand Down

0 comments on commit 5a77a8a

Please sign in to comment.