v0.20.0 #14
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
# This workflows will upload a Python Package using Poetry when a release is created | |
name: Publish Package | |
on: | |
release: | |
types: [created] | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
name: "Publish library" | |
steps: | |
- name: Check out | |
uses: actions/checkout@v3 | |
with: | |
token: "${{ secrets.GITHUB_TOKEN }}" | |
fetch-depth: 0 | |
- name: Setup Python Env | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.11" | |
- name: Install dependencies | |
run: pip install poetry dunamai | |
- name: Set version | |
run: | | |
VERSION=$(dunamai from any --no-metadata --style pep440) | |
poetry version $VERSION | |
echo "__version__ = \"$VERSION\"" > aioreactive/_version.py | |
- name: Build package | |
run: poetry build | |
- name: Release to PyPI | |
run: | | |
poetry publish -u __token__ -p ${{ secrets.PYPI_API_TOKEN }} || echo 'Version exists' |