Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/build-and-release-py2.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: test (python 2.7)

on:
push:
branches: [master]
pull_request:
branches: [master]

Expand Down
42 changes: 40 additions & 2 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: test and bump
name: test, bump and publish

on:
push:
Expand Down Expand Up @@ -78,4 +78,42 @@ jobs:
run: |
sha_new=$(git rev-parse HEAD)
echo $sha_new
echo "::set-output name=SHA::$sha_new"
echo "::set-output name=SHA::$sha_new"

publish:
needs: bump
if: ${{ github.event_name == 'push' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ needs.bump.outputs.new_sha }}

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install python dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools twine wheel coveralls
pip install -e .[all]

- name: Show python dependencies
run: |
pip freeze

- name: Build package
run: |
mkdir clean-build
python setup.py sdist bdist_wheel --universal --dist-dir ./clean-build

- name: Publish package
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.pypi_token }}
packages_dir: clean-build/