Skip to content

Commit 63c1188

Browse files
ci: replace release workflow with clean minimal version
Signed-off-by: kmilo <kmilo.denis.glez@yandex.com>
1 parent 7b541fa commit 63c1188

2 files changed

Lines changed: 60 additions & 30 deletions

File tree

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Release Clean
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
workflow_dispatch:
8+
9+
jobs:
10+
build-release:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Set up Python
21+
uses: actions/setup-python@v4
22+
with:
23+
python-version: '3.11'
24+
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install build
29+
30+
- name: Build wheel
31+
run: |
32+
python -m build --wheel --no-isolation
33+
34+
- name: Upload artifact
35+
uses: actions/upload-artifact@v4
36+
with:
37+
name: wheel
38+
path: dist/*.whl
39+
40+
- name: Publish to PyPI
41+
if: ${{ secrets.PYPI_API_TOKEN }}
42+
run: |
43+
pip install twine
44+
python -m twine upload dist/*.whl -u __token__ -p ${{ secrets.PYPI_API_TOKEN }}

‎.github/workflows/release.yml‎

Lines changed: 16 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
# Refreshed workflow
2-
name: Release
1+
name: Release Clean
32

43
on:
54
push:
@@ -8,51 +7,38 @@ on:
87
workflow_dispatch:
98

109
jobs:
11-
build-and-publish:
10+
build-release:
1211
runs-on: ubuntu-latest
1312
permissions:
1413
contents: read
14+
1515
steps:
1616
- uses: actions/checkout@v4
1717
with:
1818
fetch-depth: 0
19-
submodules: recursive
20-
- name: Debug workflow context
21-
run: |
22-
echo "--- GitHub context ---"
23-
echo "GITHUB_REF=$GITHUB_REF"
24-
echo "GITHUB_SHA=$GITHUB_SHA"
25-
echo "GITHUB_EVENT_NAME=$GITHUB_EVENT_NAME"
26-
echo "GITHUB_RUN_ID=$GITHUB_RUN_ID"
27-
echo "--- Git info ---"
28-
git log -1 --pretty=oneline || true
29-
git describe --tags --exact-match 2>/dev/null || echo "not at a tag"
30-
echo "--- Files ---"
31-
ls -la
19+
3220
- name: Set up Python
3321
uses: actions/setup-python@v4
3422
with:
3523
python-version: '3.11'
36-
- name: Install build tools
24+
25+
- name: Install dependencies
3726
run: |
3827
python -m pip install --upgrade pip
3928
pip install build
40-
- name: Generate protos (if submodule present)
41-
run: |
42-
if [ -d protos/fabric-protos ]; then
43-
PROTO_SRC=protos/fabric-protos bash scripts/gen_protos.sh
44-
else
45-
echo "No submodule protos found; assuming generated protos are committed."
46-
fi
29+
4730
- name: Build wheel
48-
run: python -m build --wheel --no-isolation
49-
- name: Upload wheel artifact
31+
run: |
32+
python -m build --wheel --no-isolation
33+
34+
- name: Upload artifact
5035
uses: actions/upload-artifact@v4
5136
with:
52-
name: python-wheel
37+
name: wheel
5338
path: dist/*.whl
54-
- name: Publish to PyPI (optional)
39+
40+
- name: Publish to PyPI
5541
if: ${{ secrets.PYPI_API_TOKEN }}
5642
run: |
57-
python -m pip install --upgrade twine
58-
python -m twine upload dist/* -u __token__ -p ${{ secrets.PYPI_API_TOKEN }}
43+
pip install twine
44+
python -m twine upload dist/*.whl -u __token__ -p ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)