-
Notifications
You must be signed in to change notification settings - Fork 0
Add release process for this plugin. #10
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| name: Create GitHub release. | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| create-github-release: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: 3.13 | ||
|
|
||
| - name: Install dev requirements. | ||
| run: make requirements-dev | ||
|
|
||
| - 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 -am "Release $CURRENT_VERSION" "$CURRENT_VERSION" | ||
| git push origin "$CURRENT_VERSION" | ||
|
|
||
| - name: Create GitHub release. | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: scriv github-release --repo=Pearson-Advance/secure-cloudfront-video |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| name: Create a release pull request. | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| semver-type: | ||
| description: "Semantic version to be released." | ||
| required: true | ||
| type: choice | ||
| options: | ||
| - "major" | ||
| - "minor" | ||
| - "patch" | ||
|
|
||
| jobs: | ||
| create-release-pr: | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| SEMVER_TYPE: ${{ github.event.inputs.semver-type }} | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: 3.13 | ||
|
|
||
| - name: Install dev requirements. | ||
| run: make requirements-dev | ||
|
|
||
| - name: Configure Git user. | ||
| run: | | ||
| git config user.name "github-actions[bot]" | ||
| git config user.email "github-actions[bot]@users.noreply.github.com" | ||
|
|
||
| - name: Calculate current and next version. | ||
| id: version | ||
| run: | | ||
| echo "CURRENT_VERSION=$(bump-my-version show current_version)" >> $GITHUB_OUTPUT | ||
| echo "NEW_VERSION=$(bump-my-version show --increment $SEMVER_TYPE new_version)" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Execute bump version. | ||
| run: bump-my-version bump $SEMVER_TYPE | ||
|
|
||
| - name: Collect changelog entries. | ||
| run: make changelog-collect | ||
|
|
||
| - name: Create pull request. | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| CURRENT_VERSION: ${{ steps.version.outputs.CURRENT_VERSION }} | ||
| NEW_VERSION: ${{ steps.version.outputs.NEW_VERSION }} | ||
| run: | | ||
| git checkout -b release-$NEW_VERSION | ||
| git commit -am "chore: bump version $CURRENT_VERSION → $NEW_VERSION" | ||
| git push origin release-$NEW_VERSION | ||
|
|
||
| gh pr create --base master \ | ||
| --title "$NEW_VERSION release" \ | ||
| --body " | ||
| ## Description | ||
|
|
||
| This PR bumps the version from \`$CURRENT_VERSION\` to \`$NEW_VERSION\`. | ||
|
|
||
| The changelog has been automatically generated using \`scriv\`. | ||
| " |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
changelog.d/20251119_085952_daniel.quiroga_add_automatic_release.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| <!-- | ||
| Create a new changelog entry for every change in the repository. | ||
|
|
||
| Please adhere to 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. | ||
| * The accepted categories are: Removed, Added, Changed, Deprecated, Fixed, | ||
| and Security. | ||
| * Indicate breaking changes with a "**BREAKING CHANGE:**" prefix in the | ||
| bullet item. | ||
|
|
||
| Uncomment the section that is right (remove the HTML comment wrapper). | ||
| For top level release notes, leave all the headers commented out. | ||
| --> | ||
|
|
||
| ### Removed | ||
|
|
||
| - Bumpversion has been removed from configuration files. | ||
|
|
||
|
|
||
| ### Added | ||
|
|
||
| - Scriv support has been added to manage CHANGELOG files. | ||
| - changelog-entry and changelog commands have been added to Makefile. | ||
| - Bump-my-version has been added to improve the release process of the plugin. | ||
| - A new Github Action workflow has been added to create a PR for the release process. | ||
| - Pyproject.toml file has been added. | ||
| - A new Github Action workflow has been added to create a GH release and tag. | ||
| - New requirements dev.in & dev.txt files have been added to organize dev requirements. | ||
|
|
||
|
|
||
| <!-- | ||
| ### Changed | ||
|
|
||
| - A bullet item for the Changed category. | ||
|
|
||
| --> | ||
|
|
||
| <!-- | ||
| ### Deprecated | ||
|
|
||
| - A bullet item for the Deprecated category. | ||
|
|
||
| --> | ||
|
|
||
| <!-- | ||
| ### Fixed | ||
|
|
||
| - A bullet item for the Fixed category. | ||
|
|
||
| --> | ||
|
|
||
| <!-- | ||
| ### Security | ||
|
|
||
| - A bullet item for the Security category. | ||
|
|
||
| --> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| [scriv] | ||
| version = literal: secure_cloudfront_video/__init__.py: __version__ | ||
| format = md | ||
| new_fragment_template = file: changelog.d/scriv/new_fragment.${config:format}.j2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| <!-- | ||
| Create a new changelog entry for every change in the repository. | ||
|
|
||
| Please adhere to 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. | ||
| * The accepted categories are: Removed, Added, Changed, Deprecated, Fixed, | ||
| and Security. | ||
| * Indicate breaking changes with a "**BREAKING CHANGE:**" prefix in the | ||
| bullet item. | ||
|
|
||
| Uncomment the section that is right (remove the HTML comment wrapper). | ||
| For top level release notes, leave all the headers commented out. | ||
| --> | ||
|
|
||
| <!-- | ||
| ### Removed | ||
|
|
||
| - A bullet item for the Removed category. | ||
|
|
||
| --> | ||
|
|
||
| <!-- | ||
| ### Added | ||
|
|
||
| - A bullet item for the Added category. | ||
|
|
||
| --> | ||
|
|
||
| <!-- | ||
| ### Changed | ||
|
|
||
| - A bullet item for the Changed category. | ||
|
|
||
| --> | ||
|
|
||
| <!-- | ||
| ### Deprecated | ||
|
|
||
| - A bullet item for the Deprecated category. | ||
|
|
||
| --> | ||
|
|
||
| <!-- | ||
| ### Fixed | ||
|
|
||
| - A bullet item for the Fixed category. | ||
|
|
||
| --> | ||
|
|
||
| <!-- | ||
| ### Security | ||
|
|
||
| - A bullet item for the Security category. | ||
|
|
||
| --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| [tool.bumpversion] | ||
| current_version = "3.0.0" | ||
| tag = false | ||
| commit = false | ||
|
|
||
| [[tool.bumpversion.files]] | ||
| filename = "secure_cloudfront_video/__init__.py" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # Development requirements used for CI and dev tooling. | ||
| bump-my-version | ||
| scriv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,97 @@ | ||
| # | ||
| # This file is autogenerated by pip-compile with Python 3.13 | ||
| # by the following command: | ||
| # | ||
| # make upgrade | ||
| # | ||
| annotated-types==0.7.0 | ||
| # via pydantic | ||
| anyio==4.11.0 | ||
| # via httpx | ||
| attrs==25.4.0 | ||
| # via scriv | ||
| bracex==2.6 | ||
| # via wcmatch | ||
| bump-my-version==1.2.4 | ||
| # via -r requirements/dev.in | ||
| certifi==2025.11.12 | ||
| # via | ||
| # httpcore | ||
| # httpx | ||
| # requests | ||
| charset-normalizer==3.4.4 | ||
| # via requests | ||
| click==8.2.1 | ||
| # via | ||
| # bump-my-version | ||
| # click-log | ||
| # rich-click | ||
| # scriv | ||
| click-log==0.4.0 | ||
| # via scriv | ||
| h11==0.16.0 | ||
| # via httpcore | ||
| httpcore==1.0.9 | ||
| # via httpx | ||
| httpx==0.28.1 | ||
| # via bump-my-version | ||
| idna==3.11 | ||
| # via | ||
| # anyio | ||
| # httpx | ||
| # requests | ||
| jinja2==3.1.6 | ||
| # via scriv | ||
| markdown-it-py==4.0.0 | ||
| # via | ||
| # rich | ||
| # scriv | ||
| markupsafe==3.0.3 | ||
| # via jinja2 | ||
| mdurl==0.1.2 | ||
| # via markdown-it-py | ||
| prompt-toolkit==3.0.52 | ||
| # via questionary | ||
| pydantic==2.12.4 | ||
| # via | ||
| # bump-my-version | ||
| # pydantic-settings | ||
| pydantic-core==2.41.5 | ||
| # via pydantic | ||
| pydantic-settings==2.12.0 | ||
| # via bump-my-version | ||
| pygments==2.19.2 | ||
| # via rich | ||
| python-dotenv==1.2.1 | ||
| # via pydantic-settings | ||
| questionary==2.1.1 | ||
| # via bump-my-version | ||
| requests==2.32.5 | ||
| # via scriv | ||
| rich==14.2.0 | ||
| # via | ||
| # bump-my-version | ||
| # rich-click | ||
| rich-click==1.9.4 | ||
| # via bump-my-version | ||
| scriv==1.7.0 | ||
| # via -r requirements/dev.in | ||
| sniffio==1.3.1 | ||
| # via anyio | ||
| tomlkit==0.13.3 | ||
| # via bump-my-version | ||
| typing-extensions==4.15.0 | ||
| # via | ||
| # pydantic | ||
| # pydantic-core | ||
| # typing-inspection | ||
| typing-inspection==0.4.2 | ||
| # via | ||
| # pydantic | ||
| # pydantic-settings | ||
| urllib3==2.5.0 | ||
| # via requests | ||
| wcmatch==10.1 | ||
| # via bump-my-version | ||
| wcwidth==0.2.14 | ||
| # via prompt-toolkit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Is this file generated automatically? I ask because of its name.
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.
Yes!, please check scriv library and the release process we are going to have from now on, this kind of file will be part of our regular PR process. I still need to create a new workflow to ensure these files are being added to each PR, but that's part of another PR. @anfbermudezme