Skip to content

Commit

Permalink
CI: Add workflow for publishing to PyPI
Browse files Browse the repository at this point in the history
This works only when a new release is published.
  • Loading branch information
dopplershift committed Aug 6, 2020
1 parent 1e3e962 commit 776bacd
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Make Release

on:
release:
types:
- published

jobs:
packages:
name: Release Packages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 150

- name: Get tags
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Install build tools
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools setuptools_scm wheel
- name: Build packages
run: python setup.py sdist bdist_wheel

- name: Publish Package
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_token }}

0 comments on commit 776bacd

Please sign in to comment.