Skip to content

Commit

Permalink
Merge pull request #136 from consideRatio/gha-release-workflow
Browse files Browse the repository at this point in the history
ci: add publish to pypi workflow
  • Loading branch information
lambdaTotoro authored Jan 31, 2021
2 parents 1d5b3b8 + fdb9f82 commit b0d9f9e
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This is a GitHub workflow defining a set of jobs with a set of steps.
# ref: https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions
#
# Publish to PyPI on push of version like tags
#
name: Publish

on:
push:
tags: v?[0-9]+.[0-9]+.[0-9]+*

jobs:
publish-to-pypi:
name: Publish to PyPI
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Install build package
run: |
pip install --upgrade pip
pip install build
pip freeze
- name: Build release
run: |
python -m build --sdist --wheel .
ls -alh dist
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@v1.4.1
with:
user: __token__
password: ${{ secrets.pypi_password }}

0 comments on commit b0d9f9e

Please sign in to comment.