Skip to content
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

Release workflow: publish django-stubs-ext before django-stubs #2188

Merged
merged 1 commit into from
May 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 18 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@ on:
release:
types: [published]

concurrency:
group: release-${{ github.event.release.tag_name }}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added concurrency per tag name, since that's what's unique towards PyPI.


jobs:
build-and-publish:
build-and-publish-ext:
runs-on: ubuntu-latest
environment:
name: release
url: https://pypi.org/p/django-stubs
name: release-ext
url: https://pypi.org/p/django-stubs-ext
permissions:
id-token: write
steps:
Expand All @@ -22,16 +25,19 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build package
run: python -m build
- name: Publish to PyPI
- name: Build ext package
run: python -m build ext/
- name: Publish ext to PyPI
uses: pypa/[email protected]
with:
packages-dir: ext/dist/

build-and-publish-ext:
build-and-publish:
runs-on: ubuntu-latest
needs: [build-and-publish-ext]
environment:
name: release-ext
url: https://pypi.org/p/django-stubs-ext
name: release
url: https://pypi.org/p/django-stubs
permissions:
id-token: write
steps:
Expand All @@ -44,9 +50,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build ext package
run: python -m build ext/
- name: Publish ext to PyPI
- name: Build package
run: python -m build
- name: Publish to PyPI
flaeppe marked this conversation as resolved.
Show resolved Hide resolved
uses: pypa/[email protected]
with:
packages-dir: ext/dist/
Loading