Skip to content

Commit

Permalink
add publish workflow (#2)
Browse files Browse the repository at this point in the history
* add publish workflow

* use real pypi

* Remove unused env variable

* Updated tag name regexp

* use correct tag regexp

* updates
  • Loading branch information
CaselIT committed Jul 13, 2021
1 parent 061a9c2 commit 6e21817
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Publish tag

on:
# run when a pushing a tag
push:
tags:
- '*'

jobs:
create-dist:
name: create-dist
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2

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

- name: Create dist
run: |
python -m pip install --upgrade pip
pip --version
pip install setuptools wheel
python setup.py sdist --dist-dir dist
- name: Publish wheel
uses: pypa/gh-action-pypi-publish@v1.4.2
with:
user: __token__
password: ${{ secrets.pypi_token }}
# comment repository_url to use the real pypi
# repository_url: https://test.pypi.org/legacy/
packages_dir: dist/

0 comments on commit 6e21817

Please sign in to comment.