Skip to content

Commit

Permalink
.github: add action to publish package to pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
larsesser committed Oct 3, 2021
1 parent 09e94ab commit 0a48d50
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
28 changes: 28 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: publish

on:
push:
tags: [ v* ]

jobs:
publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9

This comment has been minimized.

Copy link
@JohaJung

JohaJung Oct 3, 2021

Member

As we build our package in the step below and we require just py 3.8 in the setup.cfg (for which we have good reasons): Shouldn't this run better on python 3.8 too?

This comment has been minimized.

Copy link
@mhthies

mhthies Oct 4, 2021

Member

This should be insignificant here, since it only defines the Python interpreter used for packaging the Python distribution. It should not touch the module's code (at least not execute it).
The CI interpreter version is more important when running the tests, which is done in the other GitHub Actions workflow.

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Create source and wheel dist
run: |
python -m build
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = schulze-condorcet
version = 1.0.0
version = 1.0.1
author = Markus Walter
author_email = [email protected]
maintainer = CdE-Datenbank development team
Expand Down

0 comments on commit 0a48d50

Please sign in to comment.