Skip to content

Commit

Permalink
Add GitHub action for publishing to PyPI (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
gahjelle authored Oct 16, 2021
1 parent f95466a commit 70ebe02
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ tag_name = v{new_version}-{now:%Y%m%d}

[bumpversion:file:pyconfs/__init__.py]

[bumpversion:file:.github/workflows/publish_to_pypi.yml]
28 changes: 28 additions & 0 deletions .github/workflows/publish_to_pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Publish to PyPI

on:
push:
tags:
- v0.5.2(-[0-9]+)?

jobs:
publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- uses: actions/setup-python@v2
with:
python-version: 3.9

- name: "Installs dependencies"
run: |
python -m pip install flit
- name: "Build and publish to PyPI"
run: |
python -m flit publish
env:
FLIT_USERNAME: __token__
FLIT_PASSWORD: ${{ secrets.PYPI_TOKEN }}

0 comments on commit 70ebe02

Please sign in to comment.