Skip to content

Added dehumidifier settings and details (#24) #20

Added dehumidifier settings and details (#24)

Added dehumidifier settings and details (#24) #20

# This workflow 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:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Required due to the weg Git works, without it this action won't be able to find any or the correct tags
- name: 'Get Previous tag'
id: previoustag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
- name: 'Get next minor version'
id: semvers
uses: "WyriHaximus/github-action-next-semvers@v1"
with:
version: ${{ steps.previoustag.outputs.tag }}
- name: 'Release new tag'
id: release-snapshot
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.semvers.outputs.patch }}
release_name: ${{ steps.semvers.outputs.patch }}
draft: false
prerelease: false
- 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: Build and publish new release
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
sed -i.bak 's/SNAPSHOT/${{ steps.semvers.outputs.patch }}/' ./setup.py
python setup.py sdist bdist_wheel
twine upload dist/*