Skip to content

Commit 5386356

Browse files
author
Dmytro Parfeniuk
committed
👷‍♂️ Builds are updated according to a new infrastructure injector
1 parent 7ff6a6d commit 5386356

File tree

3 files changed

+25
-17
lines changed

3 files changed

+25
-17
lines changed

.github/workflows/development.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ jobs:
5151
python-version: "3.8"
5252
- name: Install pypa/build and pypa/twine
5353
run: python3 -m pip install build twine --user
54-
- name: Build a binary wheel
55-
run: python3 -m build
54+
- name: Build a binary wheel & Inject build props
55+
run: python3 -m tox -e build
5656
- name: Publish to Internal PyPI
5757
env:
58+
GUIDELLM_BUILD_TYPE: dev
59+
GUIDELLM_BUILD_NUMBER: ${{ github.event.pull_request.number }}
5860
TWINE_USERNAME: ${{ secrets.INTERNAL_PYPI_USERNAME }}
5961
TWINE_PASSWORD: ${{ secrets.INTERNAL_PYPI_PASSWORD }}
60-
run: |
61-
PR_NUMBER=$(echo ${{ github.event.pull_request.number }})
62-
python -m twine upload --repository-url ${{ secrets.INTERNAL_PYPI_REPOSITORY_URL }} dist/* --version 0.1.0.dev${PR_NUMBER} --skip-existing
62+
run: python -m twine upload --repository-url ${{ secrets.INTERNAL_PYPI_REPOSITORY_URL }} dist/*

.github/workflows/nightly.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,20 +79,24 @@ jobs:
7979
python-version: "3.8"
8080
- name: Install pypa/build and pypa/twine
8181
run: python3 -m pip install build twine --user
82-
- name: Build a binary wheel
83-
run: python3 -m build
82+
- name: Build a binary wheel & Inject build props
83+
run: python3 -m tox -e build
8484
- name: Publish to Internal PyPI
8585
env:
86+
GUIDELLM_BUILD_TYPE: nightly
87+
GUIDELLM_BUILD_NUMBER: ${{ github.event.pull_request.number }}
8688
TWINE_USERNAME: ${{ secrets.INTERNAL_PYPI_USERNAME }}
8789
TWINE_PASSWORD: ${{ secrets.INTERNAL_PYPI_PASSWORD }}
88-
run: |
89-
DATE=$(date +%Y%m%d)
90-
python -m twine upload --repository-url ${{ secrets.INTERNAL_PYPI_REPOSITORY_URL }} dist/* --version 0.1.0.${DATE}
91-
- name: Publish to Public PyPI if tests pass
90+
run: python -m twine upload --repository-url ${{ secrets.INTERNAL_PYPI_REPOSITORY_URL }} dist/*
91+
92+
- name: Publish to Public PyPI
9293
if: success()
9394
env:
95+
env:
96+
GUIDELLM_BUILD_TYPE: nightly
97+
GUIDELLM_BUILD_NUMBER: ${{ github.event.pull_request.number }}
9498
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
9599
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
96100
run: |
97101
DATE=$(date +%Y%m%d)
98-
python -m twine upload dist/* --version 0.1.0.${DATE}
102+
python -m twine upload dist/*

.github/workflows/release.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,15 @@ jobs:
8181
python-version: "3.8"
8282
- name: Install pypa/build and pypa/twine
8383
run: python3 -m pip install build twine --user
84-
- name: Build a binary wheel
85-
run: python3 -m build
84+
- name: Build a binary wheel & Inject build props
85+
run: python3 -m tox -e build
8686
- name: Publish to Internal PyPI
8787
env:
88+
GUIDELLM_BUILD_TYPE: dev
89+
GUIDELLM_BUILD_NUMBER: ${{ github.event.pull_request.number }}
8890
TWINE_USERNAME: ${{ secrets.INTERNAL_PYPI_USERNAME }}
8991
TWINE_PASSWORD: ${{ secrets.INTERNAL_PYPI_PASSWORD }}
90-
run: python -m twine upload --repository-url ${{INTERNAL_PYPI_REPOSITORY_URL}} dist/* --version 0.1.0.rc
92+
run: python -m twine upload --repository-url ${{ secrets.INTERNAL_PYPI_REPOSITORY_URL }} dist/*
9193

9294
publish-final-release:
9395
name: Publish Final Release
@@ -101,10 +103,12 @@ jobs:
101103
python-version: "3.8"
102104
- name: Install pypa/build and pypa/twine
103105
run: python3 -m pip install build twine --user
104-
- name: Build a binary wheel
105-
run: python3 -m build
106+
- name: Build a binary wheel & Inject build props
107+
run: python3 -m tox build
106108
- name: Publish to Public PyPI
107109
env:
110+
GUIDELLM_BUILD_TYPE: release
111+
GUIDELLM_BUILD_NUMBER: ${{ github.event.pull_request.number }}
108112
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
109113
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
110114
run: python -m twine upload dist/*

0 commit comments

Comments
 (0)