Skip to content

Commit

Permalink
Merge pull request #6 from pydefi/pypi
Browse files Browse the repository at this point in the history
Automate PyPi release
  • Loading branch information
clamdad authored Sep 21, 2021
2 parents 93cd77d + 2c361b4 commit 89a7883
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/publish-to-test-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Per:
# https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/

name: Publish chainfix to PyPI and TestPyPI

on: push

jobs:
build-n-publish:
name: Publish chainfix to PyPI and TestPyPI
runs-on: ubuntu-18.04

steps:
- uses: actions/checkout@master
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9

- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
- name: Publish chainfix distribution 📦 to Test PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/

- name: Publish chainfix distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit 89a7883

Please sign in to comment.