Skip to content

Commit 5c5a287

Browse files
authored
Update ci.yml
1 parent ac56ab6 commit 5c5a287

1 file changed

Lines changed: 9 additions & 41 deletions

File tree

.github/workflows/ci.yml

Lines changed: 9 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ permissions:
1212
contents: write
1313

1414
jobs:
15-
# 🟢 1️⃣ Test Job
15+
# 1️⃣ Test Job
1616
test:
1717
name: Tests
1818
runs-on: ubuntu-latest
@@ -37,50 +37,13 @@ jobs:
3737
- name: Run tests
3838
run: poetry run pytest
3939

40-
# 🔵 2️⃣ Build Job (Runs in Parallel with Tests)
41-
build:
42-
name: Build
43-
runs-on: ubuntu-latest
44-
needs: test
45-
outputs:
46-
version: ${{ steps.get_version.outputs.version }} # Store the version as an output variable
47-
steps:
48-
- name: Checkout repository
49-
uses: actions/checkout@v4
50-
51-
- name: Set up Python
52-
uses: actions/setup-python@v4
53-
with:
54-
python-version: "3.13"
55-
56-
- name: Install Poetry
57-
run: pip install poetry
58-
59-
- name: Install dependencies
60-
run: poetry install
61-
62-
- name: Build package
63-
run: poetry build
64-
65-
- name: Extract package version
66-
id: get_version # Store version output
67-
run: echo "version=$(poetry version -s)" >> $GITHUB_OUTPUT
68-
69-
- name: Upload build artifact
70-
uses: actions/upload-artifact@v4
71-
with:
72-
name: videoipath-automation-tool-${{ steps.get_version.outputs.version }}
73-
path: dist/*
74-
75-
# 🔴 3️⃣ Release Job (Uses Prebuilt Package)
40+
# 2️⃣ Release Job (Uses Prebuilt Package)
7641
release:
7742
name: Release / Publish to PyPI
7843
runs-on: ubuntu-latest
7944
needs:
8045
- test
81-
- build
8246
env:
83-
VERSION: ${{ needs.build.outputs.version }}
8447
PYPI_USERNAME: "__token__"
8548
PYPI_PASSWORD: "${{ secrets.PYPI_API_TOKEN }}"
8649
steps:
@@ -95,6 +58,12 @@ jobs:
9558
- name: Install Poetry
9659
run: pip install poetry
9760

61+
- name: Install dependencies
62+
run: poetry install
63+
64+
- name: Clean dist folder
65+
run: rm -rf dist/
66+
9867
- name: Configure Poetry and Set Version
9968
run: |
10069
git fetch --tags
@@ -113,12 +82,11 @@ jobs:
11382
echo "Development version (branch): $VERSION"
11483
poetry version "$VERSION"
11584
fi
116-
echo "VERSION=$VERSION" >> $GITHUB_ENV
11785
11886
- name: Build the package
11987
run: poetry build
12088

12189
- name: Publish to PyPI
12290
run: |
12391
poetry config pypi-token.pypi "${PYPI_API_TOKEN}"
124-
poetry publish --build
92+
poetry publish

0 commit comments

Comments
 (0)