Skip to content

Commit b179da1

Browse files
committed
ci: automate release procedure
1 parent 6e0942d commit b179da1

File tree

2 files changed

+46
-1
lines changed

2 files changed

+46
-1
lines changed

.github/workflows/release.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
bump:
7+
description: "Release bump: major, minor or patch"
8+
required: true
9+
default: "patch"
10+
extension:
11+
description: "Extension name"
12+
required: true
13+
default: "HdfsBrowser"
14+
15+
jobs:
16+
bump-version:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v2
20+
with:
21+
persist-credentials: false
22+
- uses: actions/setup-python@v2
23+
with:
24+
python-version: '3.x'
25+
- uses: BSFishy/pip-action@v1
26+
with:
27+
packages: |
28+
bump2version
29+
- name: Bump and tag
30+
run: |
31+
git config --local user.email "[email protected]"
32+
git config --local user.name "swan-admins[bot]"
33+
cd ${{ github.event.inputs.extension }}
34+
bump2version ${{ github.event.inputs.bump }}
35+
- name: Push changes
36+
uses: ad-m/github-push-action@master
37+
with:
38+
github_token: ${{ secrets.WORKFLOW_ACCESS_TOKEN }}
39+
tags: true

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,10 @@ Repository that stores all the Jupyter extensions for SWAN.
1212
* [SwanNotebookViewer](SwanNotebookViewer) - Read-only mode for opening notebooks (used from the Sharing interface) inside Jupyter Notebooks
1313
* [SwanNotifications](SwanNotifications) - Extension to display notifications to users
1414
* [SwanOauthRenew](SwanOauthRenew) - Extension that fetches the latest oAuth tokens from JupyterHub and writes to the file observed by EOS
15-
* [SwanShare](SwanShare) - Jupyter Notebooks/CERNBox sharing integration used by SwanContents
15+
* [SwanShare](SwanShare) - Jupyter Notebooks/CERNBox sharing integration used by SwanContents
16+
17+
### Development
18+
19+
#### Create a release
20+
21+
The creation of a new release in this repo is now automated. Just run the Github action "Release" manually, and specify the extension name and the increment type.

0 commit comments

Comments
 (0)