Skip to content

Commit ce22b23

Browse files
[CD] Upload package to PyPI when creating a release (#48)
* enable running the script without installing as a package While developing, we can test out changes without pip install * [CD] Upload package to PyPI when creating a release * fix according to code review * fix permissions
1 parent ba9e649 commit ce22b23

File tree

3 files changed

+39
-1
lines changed

3 files changed

+39
-1
lines changed

.github/workflows/release.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: PyPI Upload
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
8+
jobs:
9+
dist:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: hynek/build-and-inspect-python-package@v2
14+
15+
publish:
16+
needs: [dist]
17+
environment: pypi
18+
permissions:
19+
id-token: write
20+
attestations: write
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- uses: actions/download-artifact@v4
25+
with:
26+
name: Packages
27+
path: dist
28+
29+
- name: Generate artifact attestation for sdist and wheel
30+
uses: actions/attest-build-provenance@v2
31+
with:
32+
subject-path: "dist/*"
33+
34+
- uses: pypa/gh-action-pypi-publish@release/v1

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ build-backend = "hatchling.build"
55
[project]
66
name = "idd"
77
version = "0.1.0"
8-
description = "Add your description here"
8+
description = "A tool for performing interactive dynamic differential debugging capable to identify functional and performance regressions."
99
readme = "README.md"
1010
authors = [
1111
{ name = "Martin Vassilev" },

src/idd/cli.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,3 +470,7 @@ def main() -> None:
470470
disable_assembly = args["disable_assembly"]
471471
dd = DiffDebug(disable_assembly, disable_registers, base_only)
472472
dd.run()
473+
474+
475+
if __name__ == "__main__":
476+
main()

0 commit comments

Comments
 (0)