Skip to content

Commit

Permalink
enable pyPI deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
jannikmi committed May 5, 2023
1 parent de70515 commit 8b8be47
Showing 1 changed file with 42 additions and 42 deletions.
84 changes: 42 additions & 42 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,45 +46,45 @@ jobs:
- name: Run tox
run: tox

# deploy:
# runs-on: ubuntu-latest
# needs: test
# if: endsWith(github.ref, '/master')
# steps:
# - uses: actions/checkout@v2
#
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v2
# with:
# python-version: 3.8
#
# - name: Install build dependencies
# run: |
# pip install poetry
#
# - name: Fetch version
# id: fetch_version
# run: echo "::set-output name=version_nr::$(poetry version -s)"
#
# - name: Build a binary wheel and a source tarball
# # Note: poetry build required to support CLI script entrypoint in pyproject.toml?!
# run: |
# poetry build
#
# - name: Create GitHub Release
# id: create_gh_release
# uses: actions/create-release@v1
# env:
# # use token provided by Actions
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# VERSION: ${{ steps.fetch_version.outputs.version_nr }}
# with:
# tag_name: ${{env.VERSION}}
# release_name: Release ${{env.VERSION}}
# draft: false
# prerelease: false
#
# - name: PyPI Publishing
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# password: ${{ secrets.PYPI_DEPLOYMENT_API_KEY }}
deploy:
runs-on: ubuntu-latest
needs: test
if: endsWith(github.ref, '/master')
steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Install build dependencies
run: |
pip install poetry
- name: Fetch version
id: fetch_version
run: echo "::set-output name=version_nr::$(poetry version -s)"

- name: Build a binary wheel and a source tarball
# Note: poetry build required to support CLI script entrypoint in pyproject.toml?!
run: |
poetry build
- name: Create GitHub Release
id: create_gh_release
uses: actions/create-release@v1
env:
# use token provided by Actions
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ steps.fetch_version.outputs.version_nr }}
with:
tag_name: ${{env.VERSION}}
release_name: Release ${{env.VERSION}}
draft: false
prerelease: false

- name: PyPI Publishing
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_DEPLOYMENT_API_KEY }}

0 comments on commit 8b8be47

Please sign in to comment.