-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (37 loc) · 1.21 KB
/
tag.yaml
File metadata and controls
49 lines (37 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Tag
on:
push:
tags:
- v*
workflow_dispatch:
jobs:
Pypi:
runs-on: ubuntu-latest
container:
image: python:3.13
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