Skip to content

Commit

Permalink
Setup workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
lcnittl committed Jun 5, 2021
1 parent 69eb6a8 commit aebea20
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# This workflow will upload a Python Package to PyPI when a release is published
# For more information see:
# - https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
# - https://github.com/pypa/gh-action-pypi-publish

name: Upload Python Package

on:
release:
types: [published]

jobs:
deploy:
name: Build and publish to PyPI
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade setuptools wheel
- name: Build
run: |
python setup.py sdist bdist_wheel
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
21 changes: 21 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# This workflow will create a release when a version tag ist pushed
# For more information see: https://github.com/softprops/action-gh-release

name: Create GitHub Release

on:
push:
tags: "v*.*.*"

jobs:
deploy:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }} # Private Acces Token
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Does not trigger release

0 comments on commit aebea20

Please sign in to comment.