Skip to content

Commit 98576d2

Browse files
committed
fix(ci): Add build dependency, upload package artifacts as build assets
1 parent 343ce96 commit 98576d2

File tree

3 files changed

+50
-27
lines changed

3 files changed

+50
-27
lines changed

.github/workflows/release.yaml

+19-1
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ on:
44
workflow_dispatch:
55
release:
66
types:
7-
- released
7+
- published
88

99
permissions:
1010
contents: write
11+
id-token: write
1112

1213
jobs:
1314
build-release:
@@ -22,13 +23,30 @@ jobs:
2223
pythonVersion: "3.11"
2324
# Package build
2425
- name: Build and check
26+
id: build
2527
run: |
2628
python -m build
29+
echo "package_wheel=$(basename dist/*.whl)" >> $GITHUB_OUTPUT
30+
echo "package_sdist=$(basename dist/*.gz)" >> $GITHUB_OUTPUT
2731
- name: Upload build artifacts
2832
uses: actions/upload-artifact@v4
2933
with:
3034
name: dist
3135
path: dist
36+
- name: Add wheel as release asset
37+
uses: actions/upload-release-asset@latest
38+
with:
39+
upload_url: ${{ github.event.release.upload_url }}
40+
asset_path: dist/${{ steps.build.outputs.package_wheel }}
41+
asset_name: ${{ steps.build.outputs.package_wheel }}
42+
asset_content_type: application/zip
43+
- name: Add sdist as release asset
44+
uses: actions/upload-release-asset@latest
45+
with:
46+
upload_url: ${{ github.event.release.upload_url }}
47+
asset_path: dist/${{ steps.build.outputs.package_sdist }}
48+
asset_name: ${{ steps.build.outputs.package_sdist }}
49+
asset_content_type: application/zip
3250
# Docs
3351
- name: Build release documentation
3452
run: mkdocs build

pyproject.toml

+25-25
Original file line numberDiff line numberDiff line change
@@ -9,39 +9,39 @@ version = "0.1.0"
99
readme = "README.md"
1010
requires-python = ">=3.10"
1111
dependencies = [
12-
"docker",
13-
"kubernetes",
14-
"ray[train,default]==2.34.0",
15-
"tensorflow",
12+
"docker",
13+
"kubernetes",
14+
"ray[train,default]==2.34.0",
15+
"tensorflow",
1616
]
1717
authors = [
18-
{ name = "appliedAI Institute for Europe", email = "opensource@appliedai-institute.de" },
18+
{ name = "appliedAI Institute for Europe", email = "opensource@appliedai-institute.de" },
1919
]
2020
maintainers = [
21-
{ name = "Nicholas Junge", email = "n.junge@appliedai-institute.de" },
22-
{ name = "Max Mynter", email = "m.mynter@appliedai-institute.de" },
23-
{ name = "Adrian Rumpold", email = "a.rumpold@appliedai-institute.de" },
21+
{ name = "Nicholas Junge", email = "n.junge@appliedai-institute.de" },
22+
{ name = "Max Mynter", email = "m.mynter@appliedai-institute.de" },
23+
{ name = "Adrian Rumpold", email = "a.rumpold@appliedai-institute.de" },
2424
]
2525

2626
[project.scripts]
2727
jobs_execute = "jobs.execute:execute"
2828
jobby = "jobs.cli:main"
2929

3030
[project.optional-dependencies]
31-
dev = ["ruff", "pytest", "pre-commit"]
31+
dev = ["build", "ruff", "pytest", "pre-commit"]
3232
docs = [
33-
"mkdocs",
34-
"mkdocs-callouts",
35-
"mkdocs-gen-files",
36-
"mkdocs-literate-nav",
37-
"mkdocs-section-index",
38-
"mkdocs-material",
39-
"mkdocstrings[python]",
40-
"mkdocs-include-dir-to-nav",
41-
"black", # formatting of signatures in docs
42-
"mike",
43-
"appnope", # required only on Darwin, but need to include in lockfile
44-
"docstring-parser",
33+
"mkdocs",
34+
"mkdocs-callouts",
35+
"mkdocs-gen-files",
36+
"mkdocs-literate-nav",
37+
"mkdocs-section-index",
38+
"mkdocs-material",
39+
"mkdocstrings[python]",
40+
"mkdocs-include-dir-to-nav",
41+
"black", # formatting of signatures in docs
42+
"mike",
43+
"appnope", # required only on Darwin, but need to include in lockfile
44+
"docstring-parser",
4545
]
4646

4747
[tool.setuptools.package-data]
@@ -57,10 +57,10 @@ src = ["src"]
5757
[tool.ruff.lint]
5858
select = ["E", "F", "I", "W"]
5959
ignore = [
60-
# Line too long
61-
"E501",
62-
# Allow capitalized variable names
63-
"F841",
60+
# Line too long
61+
"E501",
62+
# Allow capitalized variable names
63+
"F841",
6464
]
6565

6666
[tool.mypy]

requirements-dev.txt

+6-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ babel==2.15.0
3030
# via mkdocs-material
3131
black==24.4.2
3232
# via job-queue (pyproject.toml)
33+
build==1.2.1
34+
# via job-queue (pyproject.toml)
3335
cachetools==5.3.3
3436
# via google-auth
3537
certifi==2024.7.4
@@ -237,6 +239,7 @@ optree==0.12.1
237239
packaging==24.1
238240
# via
239241
# black
242+
# build
240243
# keras
241244
# mkdocs
242245
# pytest
@@ -298,6 +301,8 @@ pymdown-extensions==10.9
298301
# mkdocstrings
299302
pyparsing==3.1.2
300303
# via mike
304+
pyproject-hooks==1.1.0
305+
# via build
301306
pytest==8.2.2
302307
# via job-queue (pyproject.toml)
303308
python-dateutil==2.9.0.post0
@@ -353,7 +358,7 @@ rsa==4.9
353358
# via google-auth
354359
ruff==0.5.1
355360
# via job-queue (pyproject.toml)
356-
setuptools==70.3.0
361+
setuptools==72.1.0
357362
# via
358363
# tensorboard
359364
# tensorflow

0 commit comments

Comments
 (0)