Skip to content

Commit fafb657

Browse files
author
Dmytro Parfeniuk
committed
🚧 WIP
1 parent 88e6c12 commit fafb657

File tree

5 files changed

+94
-46
lines changed

5 files changed

+94
-46
lines changed

.github/workflows/development.yml

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Development
33
on:
44
pull_request:
55
branches:
6-
- '**'
6+
- "**"
77

88
jobs:
99
unit-tests:
@@ -28,9 +28,7 @@ jobs:
2828
runs-on: ubuntu-latest
2929
strategy:
3030
matrix:
31-
python:
32-
- "3.12"
33-
- "3.8"
31+
python: ["3.12", "3.8"]
3432
steps:
3533
- uses: actions/checkout@v4
3634
- name: Set up Python
@@ -41,3 +39,24 @@ jobs:
4139
run: pip install tox
4240
- name: Run integration tests
4341
run: tox -e test-integration -- -m smoke
42+
43+
publish-dev:
44+
needs: [unit-tests, integration-tests]
45+
runs-on: ubuntu-latest
46+
steps:
47+
- uses: actions/checkout@v4
48+
- name: Set up Python
49+
uses: actions/setup-python@v5
50+
with:
51+
python-version: "3.8"
52+
- name: Install pypa/build and pypa/twine
53+
run: python3 -m pip install build twine --user
54+
- name: Build a binary wheel
55+
run: python3 -m build
56+
- name: Publish to Internal PyPI
57+
env:
58+
TWINE_USERNAME: ${{ secrets.INTERNAL_PYPI_USERNAME }}
59+
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

.github/workflows/nightly.yml

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Nightly
22

33
on:
44
schedule:
5-
- cron: '0 0 * * *' # Runs at midnight every night
5+
- cron: "0 0 * * *"
66

77
jobs:
88
unit-tests:
@@ -67,3 +67,32 @@ jobs:
6767
run: pip install tox
6868
- name: Run e2e tests
6969
run: tox -e test-e2e -- -m smoke
70+
71+
publish-nightly:
72+
needs: [unit-tests, integration-tests, e2e-tests]
73+
runs-on: ubuntu-latest
74+
steps:
75+
- uses: actions/checkout@v4
76+
- name: Set up Python
77+
uses: actions/setup-python@v5
78+
with:
79+
python-version: "3.8"
80+
- name: Install pypa/build and pypa/twine
81+
run: python3 -m pip install build twine --user
82+
- name: Build a binary wheel
83+
run: python3 -m build
84+
- name: Publish to Internal PyPI
85+
env:
86+
TWINE_USERNAME: ${{ secrets.INTERNAL_PYPI_USERNAME }}
87+
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
92+
if: success()
93+
env:
94+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
95+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
96+
run: |
97+
DATE=$(date +%Y%m%d)
98+
python -m twine upload dist/* --version 0.1.0.${DATE}

.github/workflows/publish.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

.github/workflows/quality.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- main
77
pull_request:
88
branches:
9-
- '**'
9+
- "**"
1010

1111
jobs:
1212
quality-check:

.github/workflows/release.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,43 @@ jobs:
6868
run: pip install tox
6969
- name: Run e2e tests
7070
run: tox -e test-e2e -- --cov-report=term-missing --cov --cov-fail-under=75
71+
72+
publish-release-candidate:
73+
name: Publish Release Candidate
74+
needs: [unit-tests, integration-tests, e2e-tests]
75+
runs-on: ubuntu-latest
76+
steps:
77+
- uses: actions/checkout@v4
78+
- name: Set up Python
79+
uses: actions/setup-python@v5
80+
with:
81+
python-version: "3.8"
82+
- name: Install pypa/build and pypa/twine
83+
run: python3 -m pip install build twine --user
84+
- name: Build a binary wheel
85+
run: python3 -m build
86+
- name: Publish to Internal PyPI
87+
env:
88+
TWINE_USERNAME: ${{ secrets.INTERNAL_PYPI_USERNAME }}
89+
TWINE_PASSWORD: ${{ secrets.INTERNAL_PYPI_PASSWORD }}
90+
run: python -m twine upload --repository-url ${{INTERNAL_PYPI_REPOSITORY_URL}} dist/* --version 0.1.0.rc
91+
92+
publish-final-release:
93+
name: Publish Final Release
94+
if: github.ref == 'refs/tags/v*'
95+
runs-on: ubuntu-latest
96+
steps:
97+
- uses: actions/checkout@v4
98+
- name: Set up Python
99+
uses: actions/setup-python@v5
100+
with:
101+
python-version: "3.8"
102+
- name: Install pypa/build and pypa/twine
103+
run: python3 -m pip install build twine --user
104+
- name: Build a binary wheel
105+
run: python3 -m build
106+
- name: Publish to Public PyPI
107+
env:
108+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
109+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
110+
run: python -m twine upload dist/*

0 commit comments

Comments
 (0)