-
-
Notifications
You must be signed in to change notification settings - Fork 515
Use same uv workspace for django-stubs-ext also
#2857
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,21 +16,17 @@ jobs: | |
| permissions: | ||
| id-token: write | ||
| steps: | ||
| - name: Setup python to build package | ||
| uses: actions/setup-python@v6 | ||
| - name: Install uv & Python | ||
| uses: astral-sh/setup-uv@v6 | ||
| with: | ||
| python-version: '3.12' | ||
| - name: Install build | ||
| run: python -m pip install build | ||
| python-version: "3.13" | ||
| - uses: actions/checkout@v5 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Build ext package | ||
| run: python -m build ext/ | ||
| run: uv build --package=django-stubs-ext | ||
| - name: Publish ext to PyPI | ||
| uses: pypa/[email protected] | ||
| with: | ||
| packages-dir: ext/dist/ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Top-level There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. how does it look inside ? Is there a risk we upload part of django-stub-ext in django-stubs or the other way around ? And does it mean that a bare There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Not as long as
Seems like it just looks at the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
After running both build commands it has 4 files: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Then I suppose a simple uv publish might be enough here, I'm using this action for one of my packages ? We can probably test with test pypi There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
We don't use manually configured PyPI credentials like the one linked above. There's some authentication magic that happens between GitHub Actions and PyPI. No idea how it works, I'd rather not touch it myself. :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
oh right, that's probably good to keep indeed |
||
|
|
||
| build-and-publish: | ||
| runs-on: ubuntu-latest | ||
|
|
@@ -49,6 +45,6 @@ jobs: | |
| with: | ||
| fetch-depth: 0 | ||
| - name: Build package | ||
| run: uv build | ||
| run: uv build --package=django-stubs | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In theory, we could use But I couldn't figure out whether So the original concern for splitting GitHub jobs may be still valid. --> #2183 (comment)
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think one job is even better: because now the first one can finish and the second one can fail. |
||
| - name: Publish to PyPI | ||
| uses: pypa/[email protected] | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uv_buildbuild system & cleanup #2848There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no worries, they behave the same anyway