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
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Create a new GitHub Release
name: Create a Release Pull Request

on:
workflow_dispatch:
inputs:
tag:
bump-type:
description: "The type of version bump"
required: true
type: choice
Expand All @@ -13,10 +13,10 @@ on:
- "patch"

jobs:
release:
create-release-pr:
runs-on: ubuntu-latest
env:
TAG: ${{ github.event.inputs.tag }}
BUMP_TYPE: ${{ github.event.inputs.bump-type }}

steps:
- name: Checkout
Expand All @@ -27,37 +27,35 @@ jobs:
with:
python-version: 3.11

- name: Install requirements
- name: Install release requirements
run: pip install scriv bump-my-version

- name: Install pandoc for scriv
run: sudo apt install -y pandoc

- name: Set up Git
- name: Configure Git user
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'

- name: Get current and new version
- name: Compute version bump
id: version
run: |
echo "CURRENT_VERSION=$(bump-my-version show current_version)" >> $GITHUB_OUTPUT
echo "NEW_VERSION=$(bump-my-version show --increment $TAG new_version)" >> $GITHUB_OUTPUT
echo "NEW_VERSION=$(bump-my-version show --increment $BUMP_TYPE new_version)" >> $GITHUB_OUTPUT

- name: Bump version
run: bump-my-version bump $TAG
run: bump-my-version bump $BUMP_TYPE

- name: Collect changelog
run: make changelog

- name: Commit changes and create tag
uses: stefanzweifel/git-auto-commit-action@v5
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
branch: ${{ github.ref }}
commit_message: "chore: bump version ${{ steps.version.outputs.CURRENT_VERSION }} → ${{ steps.version.outputs.NEW_VERSION }}"
tagging_message: "v${{ steps.version.outputs.NEW_VERSION }}"

- name: Create GitHub release
run: scriv github-release --repo=openedx/openedx-filters
env:
GITHUB_TOKEN: ${{ github.token }}
commit-message: "chore: bump version ${{ steps.version.outputs.CURRENT_VERSION }} → ${{ steps.version.outputs.NEW_VERSION }}"
title: "v${{ steps.version.outputs.NEW_VERSION }} Release"
body: |
### Description

This PR bumps the version from `${{ steps.version.outputs.CURRENT_VERSION }}` to `${{ steps.version.outputs.NEW_VERSION }}`.

The changelog has been automatically generated using `scriv`.
branch: "release-${{ steps.version.outputs.NEW_VERSION }}"
45 changes: 45 additions & 0 deletions .github/workflows/github-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Create a new GitHub Release

on:
workflow_dispatch:

jobs:
github-release:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11

- name: Install release requirements
run: pip install scriv bump-my-version

- name: Install pandoc for scriv
run: sudo apt install -y pandoc

- name: Configure Git user
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'

- name: Read current version
id: version
run: |
echo "CURRENT_VERSION=$(bump-my-version show current_version)" >> $GITHUB_OUTPUT

- name: Create and push Git tag
env:
CURRENT_VERSION: ${{ steps.version.outputs.CURRENT_VERSION }}
run: |
git tag -a "v$CURRENT_VERSION" -m "Release v$CURRENT_VERSION"
git push origin "v$CURRENT_VERSION"

- name: Create GitHub release
run: scriv github-release --repo=openedx/openedx-filters
env:
GITHUB_TOKEN: ${{ github.token }}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Added
~~~~~
* New documentation section with naming suggestions for creating filters. (by @mariajgrimaldi)
* New documentation section with naming suggestions for creating filters. (by @mariajgrimaldi in #264)
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Changed
~~~~~~~
* Updated documentation titles and styles to follow the Open edX style guide. (by @Apgomeznext)
* Updated documentation titles and styles to follow the Open edX style guide. (by @Apgomeznext in #262 and #263)
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Changed
~~~~~~~
* Updated the glossary section in the documentation. (by @Apgomeznext)
* Updated the glossary section in the documentation. (by @Apgomeznext in #266)
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Changed
~~~~~~~
* Improved how-to guides including updates to filters, samples, and formatting. (by @mariajgrimaldi)
* Improved how-to guides including updates to filters, samples, and formatting. (by @mariajgrimaldi in #260)
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Changed
~~~~~~~
* Updated edX RTD link to Open edX RTD. (by @sarina)
* Updated edX RTD link to Open edX RTD. (by @sarina in #269)
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Changed
~~~~~~~
* Replaced the deprecated ``pydocstyle`` library with ``ruff``. (by @bryanttv)
* Replaced the deprecated ``pydocstyle`` library with ``ruff``. (by @bryanttv in #270)
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Added
~~~~~
* Migrate to ``scriv`` for manage changelog. (by @bryanttv)
* Migrate to ``scriv`` for manage changelog. (by @bryanttv in #268)
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Changed
~~~~~~~
* Update ``release.yml`` workflow to create PR with release changes. (by @bryanttv in #284)
* Update ``new_fragment.rst.j2`` template to include PR number in the changes. (by @bryanttv in #284)
20 changes: 11 additions & 9 deletions changelog.d/scriv/new_fragment.rst.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

.. Please respect the following instructions:
.. * Add a new bullet item for the category that best describes the change.
.. * You may optionally append "(by @<author>)" at the end of the bullet item,
.. where @<author> is the GitHub username of the author of the change. These
.. affiliations will be displayed in the release notes for every release.
.. * You may optionally append "(by @<author> in #<pr-number>)" at the end of
.. the bullet item. This will be used to credit the PR author in the bullet
.. item, where <author> is the GitHub username of the author of the change
.. and <pr-number> is the PR number of the change. These affiliations will
.. be displayed in the release notes for every release.
.. * The accepted categories are: Added, Changed, Deprecated, Removed, Fixed,
.. and Security.
.. * Indicate breaking changes with a "**BREAKING CHANGE:**" prefix in the
Expand All @@ -15,29 +17,29 @@
.. Added
.. ~~~~~
.. * Added new ``CourseAccessFilter`` for controlling course content access.
.. * Added support for asynchronous filter execution. (by @developer)
.. * Added support for asynchronous filter execution. (by @developer in #1)

.. Changed
.. ~~~~~~~
.. * Improved filter pipeline performance.
.. * **BREAKING CHANGE:** Restructured filter response format for better consistency. (by @developer)
.. * **BREAKING CHANGE:** Restructured filter response format for better consistency. (by @developer in #2)

.. Deprecated
.. ~~~~~~~~~~
.. * Deprecated legacy filter registration method.
.. * Deprecated old filter pipeline format. (by @developer)
.. * Deprecated old filter pipeline format. (by @developer in #3)

.. Removed
.. ~~~~~~~
.. * Removed deprecated v1 filter interfaces.
.. * Removed support for synchronous-only filters. (by @developer)
.. * Removed support for synchronous-only filters. (by @developer in #4)

.. Fixed
.. ~~~~~
.. * Fixed memory leak in long-running filter chains.
.. * Fixed incorrect exception handling in filter pipeline. (by @developer)
.. * Fixed incorrect exception handling in filter pipeline. (by @developer in #5)

.. Security
.. ~~~~~~~~
.. * Enhanced filter input validation.
.. * Updated filter execution permissions model. (by @developer)
.. * Updated filter execution permissions model. (by @developer in #6)