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

pypi: Automatic Releases #151

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
32 changes: 32 additions & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Upload release to PyPI (Test & Live)
on:
push:
branches: [main]
release:
types: [published]

jobs:
pypi-publish:
name: Upload release to PyPI (Test & Live)
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/libcoveweb
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: pip install --upgrade build
- run: python -m build --sdist --wheel
- name: Publish package distributions to TEST PyPI
if: github.event_name == 'push'
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
skip-existing: true
- name: Publish package distributions to LIVE PyPI
if: github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@release/v1
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
scripts=['manage.py'],
url='https://github.com/OpenDataServices/lib-cove-web',
description='',
long_description="",
long_description_content_type="text/plain",
classifiers=[
'License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)',
],
Expand Down
Loading