File tree Expand file tree Collapse file tree 5 files changed +94
-46
lines changed Expand file tree Collapse file tree 5 files changed +94
-46
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ name: Development
3
3
on :
4
4
pull_request :
5
5
branches :
6
- - ' ** '
6
+ - " ** "
7
7
8
8
jobs :
9
9
unit-tests :
28
28
runs-on : ubuntu-latest
29
29
strategy :
30
30
matrix :
31
- python :
32
- - " 3.12"
33
- - " 3.8"
31
+ python : ["3.12", "3.8"]
34
32
steps :
35
33
- uses : actions/checkout@v4
36
34
- name : Set up Python
41
39
run : pip install tox
42
40
- name : Run integration tests
43
41
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
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ name: Nightly
2
2
3
3
on :
4
4
schedule :
5
- - cron : ' 0 0 * * *' # Runs at midnight every night
5
+ - cron : " 0 0 * * *"
6
6
7
7
jobs :
8
8
unit-tests :
67
67
run : pip install tox
68
68
- name : Run e2e tests
69
69
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}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 6
6
- main
7
7
pull_request :
8
8
branches :
9
- - ' ** '
9
+ - " ** "
10
10
11
11
jobs :
12
12
quality-check :
Original file line number Diff line number Diff line change 68
68
run : pip install tox
69
69
- name : Run e2e tests
70
70
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/*
You can’t perform that action at this time.
0 commit comments