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

Automate release #1026

Merged
merged 7 commits into from
Apr 20, 2023
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
1 change: 1 addition & 0 deletions create-release.sh → .github/create-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ if [ -d build ]; then
else
rm -rf build
fi
rm -rf build
fi

npm ci
Expand Down
33 changes: 33 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
changelog:

exclude:
authors:
- dependabot
- dependabot[bot]

categories:
- title: Security Fixes
labels:
- type:security

- title: New Features
labels:
- type:new-feature

- title: Usability and Accessibility
labels:
- type:accessibility
- type:usability
- type:visual-clarity

- title: Bug Fixes
labels:
- type:bug

- title: Documentation
labels:
- type:documentation

- title: Other Changes
labels:
- "*"
31 changes: 31 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
on:
push:
tags:
- '*-*-*'

name: Create release draft

jobs:
build:
name: Create release from tag
runs-on: ubuntu-latest

steps:
- name: checkout code
uses: actions/checkout@v3

- name: use node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16

- name: create release tarball
run: echo 'y' | ./.github/create-release.sh

- name: create new release
uses: softprops/action-gh-release@v1
with:
files: oc-studio-*.tar.gz
draft: true
fail_on_unmatched_files: true
generate_release_notes: true
43 changes: 22 additions & 21 deletions doc/make-release.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
# How to release Opencast Studio
# How to cut a release for Opencast Studio

Checkout the branch `master` from Opencast Studio and make sure it is up-to-date (working directory should be clean!).
Execute `./create-release.sh`. Now there should be two new `*.tar.gz` files.

## Release

Go to [the release section on GitHub](https://github.com/elan-ev/opencast-studio/releases) and click "Draft a new release". Click on "choose a tag" and enter the current date in YYYY-MM-DD and then "Create new tag".
Make sure the target is still `master`.
As a release title, enter the current date again in the same format.
List all changes (since the last release) in the text box.
Upload the two `*.tar.gz` files and click "Publish release".

## Update Opencast

Checkout a new branch.
Go to `modules/studio/pom.xml`. You have to change two lines:
- `<opencast.studio.url>`: change the url to the new relase-url from `*-integrated.tar.gz`. (Usually only the date has to be adjusted here.)
- `<opencast.studio.sha256>`: update the sha256 hash. (Run `sha256sum *-integrated.tar.gz` in Opencast Studio folder)
Open a new pull request (optional: add a link to the release and changelog in the description)

Before opening a new pull request, you can build Opencast and test Opencast Studio. The release date should be on the info page.
1. Switch to the commit you want to turn into the release
2. Create and push a new tag
```bash
DATE=$(date +%Y-%m-%d)
git tag -m Release -s "$DATE"
git push upstream "$DATE":"$DATE"
```
3. Wait for the [Create release draft](https://github.com/elan-ev/opencast-studio/actions/workflows/create-release.yml)
to finish
- it will create a new [GitHub release draft](https://github.com/elan-ev/opencast-studio/releases)
- review and publish the draft
4. Submit a pull request against Opencast
- [Update the release](https://github.com/opencast/opencast/blob/develop/modules/studio/pom.xml#L16-L17)
You have to change two lines:
- `<opencast.studio.url>`: change the url to the new relase-url from `*-integrated.tar.gz`. (Usually only the date has to be adjusted here.)
- `<opencast.studio.sha256>`: update the sha256 hash. (Run `sha256sum *-integrated.tar.gz` in Opencast Studio folder)
- [Adjust the documentation](https://github.com/opencast/opencast/blob/develop/docs/guides/admin/docs/modules/studio.md)
if necessary
- [Update the configuration](https://github.com/opencast/opencast/blob/develop/etc/ui-config/mh_default_org/studio/settings.toml)
if necessary
- Verify that the new release runs in Opencast, then create the pull request.