Skip to content

Commit

Permalink
Add PyPI workflow #11
Browse files Browse the repository at this point in the history
  • Loading branch information
Ludee committed Dec 9, 2024
1 parent 720cfd8 commit 6d55b73
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 2 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/publish_pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# SPDX-FileCopyrightText: 2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut
# SPDX-License-Identifier: MIT

name: Build and publish on PyPI

on:
release:
types: [published]

jobs:
build-n-publish:
name: Build and publish on PyPI
runs-on: ubuntu-latest
environment: pypi-publish
steps:
- uses: actions/checkout@master
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install pypa/build
run: >-
python3 -m
pip install
build
--user
- name: Build binary wheel and source tarball
run: >-
python3 -m
build
--sdist
--wheel
--outdir dist/
- name: Publish distribution to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI }}
1 change: 0 additions & 1 deletion .github/workflows/publish_testpypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,3 @@ jobs:
with:
password: ${{ secrets.PYPI_TEST }}
repository-url: https://test.pypi.org/legacy/
verbose: true
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ dependencies = [
"stringcase ~=1.2.0",
]


[project.urls]
Homepage = "https://github.com/rl-institut/super-repo"
Source = "https://github.com/rl-institut/super-repo"
Expand Down

0 comments on commit 6d55b73

Please sign in to comment.