Skip to content

Tag

Tag #22

Workflow file for this run

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