Skip to content

Update python-publish.yml #63

Update python-publish.yml

Update python-publish.yml #63

# This workflows will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
name: Upload Python Package
on:
push:
# Sequence of patterns matched against refs/heads
branches:
# Push events on master branch
- master
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Get version
run: echo "version=$(python setup.py --version)" >> $GITHUB_ENV
#echo ::set-env name=version::$(python setup.py --version)
- name: Debug
run: echo $version
- name: Tag
uses: tvdias/[email protected]
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ env.version }}
- name: Build and publish
run: |
python setup.py sdist bdist_wheel
- name: Publish package distributions to pyShelly
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://pypi.org/project/pyShelly/