Tag #22
This file contains hidden or 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: Tag | |
| on: | |
| push: | |
| tags: | |
| - v* | |
| workflow_dispatch: | |
| jobs: | |
| Pypi: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: python | |
| steps: | |
| - name: Check out git repo | |
| uses: actions/checkout@v2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Fix | |
| run: git config --global --add safe.directory '*' | |
| - name: Add gettext | |
| run: | | |
| apt update | |
| apt install -y gettext | |
| - name: Set version | |
| shell: bash | |
| run: | | |
| git fetch --all | |
| git describe --tags | |
| export TAG=$(git describe --tags) | |
| echo "---------------------------------------" | |
| echo "Current version: ${TAG:1}" | |
| echo "---------------------------------------" | |
| echo "$(FLYMYAI_PYTHON_VERSION=${TAG:1} envsubst < setup.py.template)" > setup.py | |
| echo "$(FLYMYAI_PYTHON_VERSION=${TAG:1} envsubst < pyproject.toml.template)" > pyproject.toml | |
| - name: Install dependencies | |
| run: pip3 install poetry && poetry config virtualenvs.create ${USE_VENV} && poetry install | |
| - name: Build & Publish | |
| run: poetry publish --username __token__ --password ${{ secrets.PYPI_API_KEY }} --build |