-
Notifications
You must be signed in to change notification settings - Fork 415
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: Add workflow for publishing to PyPI
This works only when a new release is published.
- Loading branch information
1 parent
1e3e962
commit 776bacd
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |