🔧 Fix Docker deployment (#1070) #29
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 | |
on: | |
push: | |
tags: | |
- '[0-9].[0-9]+.[0-9]+' | |
jobs: | |
build: | |
name: Build packages | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: install Poetry | |
run: python -m pip install poetry | |
- name: poetry build | |
run: poetry build | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: poetry_build | |
path: dist/ | |
# Test-PyPi release | |
publish_test: | |
name: Publish on TestPyPi | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: poetry_build | |
path: dist/ | |
- name: Display structure of downloaded files | |
run: ls -R | |
- name: install Poetry | |
run: python -m pip install poetry | |
- name: poetry configure TestPyPI Repo | |
run: poetry config repositories.test-pypi https://test.pypi.org/legacy/ | |
- name: poetry configure TestPyPI Token | |
run: poetry config pypi-token.test-pypi ${{ secrets.PYPI_TEST }} | |
- name: poetry publish TestPyPi | |
run: poetry publish -r test-pypi | |
# Get calls only, if publish on Test-PyPi has worked. | |
publish_oficial: | |
name: Publish on PyPi | |
runs-on: ubuntu-latest | |
needs: publish_test | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- uses: actions/download-artifact@v2 | |
with: | |
name: poetry_build | |
path: dist/ | |
- name: Display structure of downloaded files | |
run: ls -R | |
# PyPi Release | |
- name: install Poetry | |
run: python -m pip install poetry | |
- name: poetry configure PyPI Token | |
run: poetry config pypi-token.pypi ${{ secrets.PYPI }} | |
- name: poetry publish PyPi | |
run: poetry publish |