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 review #861

Merged
merged 2 commits into from
Feb 6, 2024
Merged
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
18 changes: 18 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[bumpversion]
current_version = 0.21.0
commit = True
tag = True
tag_name = {new_version}
message = "Bump version: {current_version} → {new_version}"

[bumpversion:file:sparkmagic/sparkmagic/__init__.py]
search = __version__ = "{current_version}"
replace = __version__ = "{new_version}"

[bumpversion:file:autovizwidget/autovizwidget/__init__.py]
search = __version__ = "{current_version}"
replace = __version__ = "{new_version}"

[bumpversion:file:hdijupyterutils/hdijupyterutils/__init__.py]
search = __version__ = "{current_version}"
replace = __version__ = "{new_version}"
55 changes: 55 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
name: Release

on:
workflow_dispatch:
inputs:
type:
type: choice
description: Select type of bump version
# https://github.com/jaumann/github-bumpversion-action/tree/v0.0.7/?tab=readme-ov-file#bumping
options:
- major
- minor
- patch
default: 'patch'
jobs:
release:
# Do not run this job for pull requests where both branches are from the same repo.
# Jobs that depend on this one will be skipped too.
# This prevents duplicate CI runs for our own pull requests, whilst preserving the ability to
# run the CI for each branch push to a fork, and for each pull request originating from a fork.
if: github.event_name == 'workflow_dispatch' || github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id
permissions:
contents: write
packages: write
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
persist-credentials: true
fetch-depth: 0
ref: master

- name: Bump version and create tag
uses: jasonamyers/github-bumpversion-action@v1.0.5
id: bump
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEFAULT_BUMP: ${{ inputs.type }}

- name: Push tag
run: git push origin master --tags
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create GitHub Release with changelog
id: create_release
uses: ncipollo/release-action@v1.13.0
with:
name: ${{ steps.bump.outputs.new_ver }}
bodyFile: CHANGELOG.md
tag: ${{ steps.bump.outputs.new_ver }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

- Enable automated test run as required step for release process
- Enable basic DependaBot scanning for pip packages and GitHub actions used in CI
- Add CI support for release proces with [release.yaml](.github/workflows/release.yml) workflow
- Release documentation is updated acrodingly in [RELEASING.md](./RELEASING.md)

## 0.21.0

Expand Down
6 changes: 2 additions & 4 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# How to release

1. Make sure `CHANGELOG.md` is up-to-date with all changes since last release.
2. Update versions in all three sub-package's `__init__.py` files.
3. Update `appVersion` in [Chart.yaml](helm/Chart.yaml)
4. Create a new release on `master` branch with https://github.com/jupyter-incubator/sparkmagic/releases/new — Tag format is "0.15.0", no "v" prefix.
1. Make sure `CHANGELOG.md` is up-to-date with all changes since last release and available on `master` branch.
2. Go to Actions -> Release workflow -> Run workflow -> Select `patch|minor|major` depending of the changes you want to release, set `master` branch as desired branch