1.1.0 #12
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release package to Pypi | |
on: | |
release: | |
types: [ published ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
environment: | |
name: pypi | |
url: https://pypi.org/p/yeti-switch-api | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt -r requirements_dev.txt | |
- name: Calculate version from ${{github.ref}} | |
env: | |
PKG_TAG: ${{github.ref}} | |
shell: bash | |
run: echo "##[set-output name=tag;]$(echo ${PKG_TAG#refs/tags/})" | |
id: extract_tag | |
- name: build package | |
run: python setup.py sdist bdist_wheel | |
env: | |
RELEASE_VERSION: ${{steps.extract_tag.outputs.tag}} | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |