23
23
path : |
24
24
~/.cache
25
25
~/.local
26
- key : poetry-${{ hashFiles('poetry.lock') }}
26
+ key : poetry-${{ hashFiles('poetry.lock') }}-${{ env.PYTHON_VERSION}}
27
27
28
28
- uses : actions/setup-python@v5
29
29
name : Setup Python
61
61
path : |
62
62
~/.cache
63
63
~/.local
64
- key : poetry-${{ hashFiles('poetry.lock') }}
64
+ key : poetry-${{ hashFiles('poetry.lock') }}-${{ env.PYTHON_VERSION}}
65
65
66
66
- name : Type Check
67
67
run : poetry run poe typecheck
75
75
- uses : actions/checkout@v4
76
76
name : Checkout
77
77
78
- - uses : actions/setup-python@v5
79
- name : Setup Python
78
+ - name : Setup Python
79
+ uses : actions/setup-python@v5
80
80
with :
81
81
python-version : ${{ env.PYTHON_VERSION }}
82
82
architecture : x64
88
88
path : |
89
89
~/.cache
90
90
~/.local
91
- key : poetry-${{ hashFiles('poetry.lock') }}
91
+ key : poetry-${{ hashFiles('poetry.lock') }}-${{ env.PYTHON_VERSION}}
92
92
93
93
- name : Lint
94
94
run : poetry run poe lint
@@ -105,8 +105,8 @@ jobs:
105
105
- uses : actions/checkout@v4
106
106
name : Checkout
107
107
108
- - uses : actions/setup-python@v5
109
- name : Setup Python
108
+ - name : Setup Python
109
+ uses : actions/setup-python@v5
110
110
with :
111
111
python-version : ${{ env.PYTHON_VERSION }}
112
112
architecture : x64
@@ -118,7 +118,7 @@ jobs:
118
118
path : |
119
119
~/.cache
120
120
~/.local
121
- key : poetry-${{ hashFiles('poetry.lock') }}
121
+ key : poetry-${{ hashFiles('poetry.lock') }}-${{ env.PYTHON_VERSION}}
122
122
123
123
- name : Run Tests
124
124
run : poetry run poe test
@@ -141,7 +141,7 @@ jobs:
141
141
with :
142
142
file : ./coverage.xml
143
143
flags : integration
144
- fail_ci_if_error : true
144
+ fail_ci_if_error : false
145
145
token : ${{ secrets.CODECOV_TOKEN }}
146
146
147
147
build :
@@ -150,8 +150,8 @@ jobs:
150
150
- dependencies
151
151
runs-on : ubuntu-latest
152
152
outputs :
153
- version : ${{ steps.extract_version .outputs.VERSION }}
154
- name : ${{ steps.extract_version .outputs.NAME }}
153
+ version : ${{ steps.extract-version .outputs.VERSION }}
154
+ name : ${{ steps.extract-version .outputs.NAME }}
155
155
steps :
156
156
- uses : actions/checkout@v4
157
157
name : Checkout
@@ -169,22 +169,21 @@ jobs:
169
169
path : |
170
170
~/.cache
171
171
~/.local
172
- key : poetry-${{ hashFiles('poetry.lock') }}
172
+ key : poetry-${{ hashFiles('poetry.lock') }}-${{ env.PYTHON_VERSION}}
173
173
174
174
- name : Extract Version
175
- id : extract_version
175
+ id : extract-version
176
176
run : |
177
177
echo "VERSION=$(poetry version --short)" >> "$GITHUB_OUTPUT"
178
- echo "NAME=$(poetry version | cut -d' ' -f1)" >> "$GITHUB_OUTPUT"
179
178
echo "VERSION=$(poetry version --short)"
179
+ echo "NAME=$(poetry version | cut -d' ' -f1)" >> "$GITHUB_OUTPUT"
180
180
echo "NAME=$(poetry version | cut -d' ' -f1)"
181
181
182
182
- name : Extract Version from CHANGELOG.md
183
- id : extract_changelog_version
184
183
run : |
185
184
VERSION_CHANGELOG=$(sed -n '3 s/## Version //p' CHANGELOG.md)
186
185
echo "VERSION_CHANGELOG=$VERSION_CHANGELOG"
187
- if [ "${{ steps.extract_version .outputs.VERSION }}" != "$VERSION_CHANGELOG" ]; then
186
+ if [ "${{ steps.extract-version .outputs.VERSION }}" != "$VERSION_CHANGELOG" ]; then
188
187
echo "Error: Version extracted from CHANGELOG.md does not match the version in pyproject.toml"
189
188
exit 1
190
189
else
@@ -193,11 +192,10 @@ jobs:
193
192
194
193
- name : Extract Version from Tag
195
194
if : startsWith(github.ref, 'refs/tags/v')
196
- id : extract_tag_version
197
195
run : |
198
196
VERSION_TAG=$(sed 's/^v//' <<< ${{ github.ref_name }})
199
197
echo "VERSION_TAG=$VERSION_TAG"
200
- if [ "${{ steps.extract_version .outputs.VERSION }}" != "$VERSION_TAG" ]; then
198
+ if [ "${{ steps.extract-version .outputs.VERSION }}" != "$VERSION_TAG" ]; then
201
199
echo "Error: Version extracted from tag does not match the version in pyproject.toml"
202
200
exit 1
203
201
else
@@ -232,7 +230,7 @@ jobs:
232
230
- build
233
231
runs-on : ubuntu-latest
234
232
environment :
235
- name : release
233
+ name : pypi
236
234
url : https://pypi.org/p/${{ needs.build.outputs.name }}
237
235
permissions :
238
236
id-token : write
@@ -265,7 +263,9 @@ jobs:
265
263
runs-on : ubuntu-latest
266
264
environment :
267
265
name : release
268
- url : https://pypi.org/p/${{ needs.build.outputs.name }}
266
+ url :
267
+ https://github.com/${{ github.repository }}/releases/tag/v${{
268
+ needs.build.outputs.version }}
269
269
permissions :
270
270
contents : write
271
271
steps :
0 commit comments