Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add release via pypi #139

Merged
merged 10 commits into from
Jan 12, 2024
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
17 changes: 11 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Release to PyPI
on:
push:
branches:
- main
- main

jobs:
build-and-deploy:
Expand All @@ -21,8 +21,13 @@ jobs:
- name: Install dependencies
run: make install-dev

- name: Publish to PyPI
env:
TWINE_USERNAME: david26694
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: make pypi-gh-actions
- name: Prepare dist/
run: make prep-dist

- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
verify-metadata: false
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ clean-test: ## remove test and coverage artifacts
rm -fr htmlcov/
rm -fr .pytest_cache

pypi: clean
python setup.py sdist
python setup.py bdist_wheel --universal
twine upload dist/*

pypi-gh-actions: clean
python setup.py sdist
python setup.py bdist_wheel --universal
prep-dist: clean
python -m build

pypi: prep-dist
twine upload --repository cluster-experiments dist/*

pypi-gh-actions: prep-dist
# todo: fix this
twine upload --skip-existing dist/*

# Report log
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"pre-commit>=2.6.0",
"ipykernel>=6.15.1",
"twine",
"build",
"tox",
] + base_packages

Expand Down
Loading