Skip to content
Open
Show file tree
Hide file tree
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
5 changes: 0 additions & 5 deletions .coveragerc

This file was deleted.

40 changes: 0 additions & 40 deletions .github/workflows/pypi-publish.yml

This file was deleted.

13 changes: 9 additions & 4 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ on:
pull_request:
branches:
- "**"
# Called from release.yml before publishing on push to main.
workflow_call:

jobs:
python-tests:
name: Run Python Tests and Coverage
runs-on: ubuntu-latest

@farhan farhan Jun 24, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we should the tox env name so it's immediately clear which matrix job failed.

Suggested change
runs-on: ubuntu-latest
name: ${{ matrix.toxenv }}

strategy:
fail-fast: true
fail-fast: false
matrix:
python-version: ["3.12"]
toxenv: [quality, docs, django42, django52]
Expand All @@ -26,13 +28,16 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: pip install -r requirements/pip-tools.txt tox
- name: Install uv
uses: astral-sh/setup-uv@v6

Comment on lines +31 to +33
- name: Install CI dependencies
run: uv sync --group ci

- name: Run tests with Tox (${{ matrix.toxenv }})
env:
TOXENV: ${{ matrix.toxenv }}
run: tox
run: uv run tox

- name: Upload coverage to Codecov
if: matrix.python-version == '3.12' && matrix.toxenv == 'django42'
Expand Down
96 changes: 96 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: Release

on:
push:
branches: [main]

jobs:
run_tests:
uses: ./.github/workflows/python-tests.yml

Comment on lines +8 to +10
release:
Comment thread
salman2013 marked this conversation as resolved.
Dismissed
needs: run_tests
runs-on: ubuntu-latest
if: github.ref_name == 'main'
concurrency:
group: ${{ github.workflow }}-release-${{ github.ref_name }}
cancel-in-progress: false

permissions:
contents: write

steps:
# Checkout at the branch that triggered the workflow, then force-reset to
# the exact sha so we don't accidentally release commits that arrived
# while this workflow was running.
- name: Setup | Checkout Repository on Release Branch
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ github.ref_name }}

- name: Setup | Force release branch to workflow sha
run: git reset --hard ${{ github.sha }}

- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.12"

- name: Set up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 24

- name: Install npm dependencies and build
run: |
npm ci
npm run build

- name: Action | Semantic Version Release
id: release
uses: python-semantic-release/python-semantic-release@754a065a2ea187da71977ada6630a8ec0f98e380 # v10.5.3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
git_committer_name: "github-actions"
git_committer_email: "actions@users.noreply.github.com"
changelog: "false"

- name: Publish | Upload to GitHub Release Assets
uses: python-semantic-release/publish-action@68eaac9f1f594e9ec4b985245d06355734f43eea # v10.5.3
if: steps.release.outputs.released == 'true'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.release.outputs.tag }}

- name: Upload | Distribution Artifacts
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
if: steps.release.outputs.released == 'true'
with:
name: distribution-artifacts
path: dist/
if-no-files-found: error

outputs:
released: ${{ steps.release.outputs.released || 'false' }}
version: ${{ steps.release.outputs.version }}

publish_to_pypi:
# Separate from the release job for least privilege and retry-ability:
# publishing can fail independently and shouldn't require reversing the release.
runs-on: ubuntu-latest
needs: release
if: github.ref_name == 'main' && needs.release.outputs.released == 'true'

permissions:
contents: read
id-token: write # for PyPI OIDC trusted publisher

steps:
- name: Download Distribution Artifacts
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: distribution-artifacts
path: dist/

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@7f25271a4aa483500f742f9492b2ab5648d61011 # v1.12.4
177 changes: 0 additions & 177 deletions CHANGELOG.rst

This file was deleted.

4 changes: 1 addition & 3 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# --- ROOT FILES ---
include CHANGELOG.rst LICENSE.txt README.rst
include requirements/base.in
include requirements/constraints.txt
include LICENSE.txt README.rst

# --- PACKAGE DATA ---
recursive-include xblocks_contrib *.html *.js *.css *.jar *.png *.gif *.jpg *.jpeg *.svg *.yaml *.underscore
Expand Down
Loading
Loading