@@ -2,9 +2,12 @@ name: Deploy to PyPI
2
2
3
3
on :
4
4
push :
5
- branches :
6
- - main
5
+ branches : [ 'main' ]
7
6
workflow_dispatch :
7
+
8
+ env :
9
+ PYTHON_VERSION_DEFAULT : " 3.10"
10
+ POETRY_VERSION : " 1.1.12"
8
11
9
12
jobs :
10
13
release :
@@ -19,22 +22,33 @@ jobs:
19
22
uses : actions/checkout@v3
20
23
with :
21
24
fetch-depth : 0
25
+
22
26
- name : Setup python
23
27
# see https://github.com/actions/setup-python
24
28
uses : actions/setup-python@v4
25
29
with :
26
- python-version : 3.9
30
+ python-version : ${{ env.PYTHON_VERSION_DEFAULT }}
31
+ architecture : ' x64'
32
+
33
+ - name : Install and configure Poetry
34
+ # See https://github.com/marketplace/actions/install-poetry-action
35
+ uses : snok/install-poetry@v1
36
+ with :
37
+ version : ${{ env.POETRY_VERSION }}
38
+ virtualenvs-create : true
39
+ virtualenvs-in-project : true
40
+ installer-parallel : true
41
+
27
42
- name : Install dependencies
28
- run : |
29
- python -m pip install poetry --upgrade pip
30
- poetry config virtualenvs.create false
31
- poetry install
43
+ run : poetry install --no-root
44
+
32
45
- name : View poetry version
33
46
run : poetry --version
47
+
34
48
- name : Python Semantic Release
35
49
# see https://python-semantic-release.readthedocs.io/en/latest/automatic-releases/github-actions.html
36
50
# see https://github.com/relekang/python-semantic-release
37
- uses : relekang/python-semantic-release@v7.29.5
51
+ uses : relekang/python-semantic-release@v7.31.2
38
52
with :
39
53
github_token : ${{ secrets.GITHUB_TOKEN }}
40
54
repository_username : __token__
0 commit comments