Skip to content

Commit 9b34ef9

Browse files
authored
Merge pull request #296 from nscuro/enable-releasing-from-release-branch
Enable release creation from non-master branches
2 parents 9c6bd07 + c4ed1f6 commit 9b34ef9

File tree

4 files changed

+12
-27
lines changed

4 files changed

+12
-27
lines changed

.github/images/release-branch.png

-21.8 KB
Loading
498 KB
Loading

.github/workflows/ci-release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
3737
npm version ${{ github.event.inputs.version-to-bump }} -m "prepare-release: set version to %s"
3838
39-
git push origin "HEAD:refs/heads/master"
39+
git push origin "HEAD:${{ github.ref }}"
4040
4141
- name: Create GitHub Release
4242
env:

RELEASING.md

Lines changed: 11 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -14,36 +14,21 @@ This document describes the process of releasing a new version of the Dependency
1414
![Create a release from `master`](./.github/images/release-master.png)
1515

1616
5. Ensure that `master` is selected in the branch dropdown
17-
6. Select the part that should be bumped for this release (see [Semantic Versioning](https://semver.org/))
17+
6. For the part of the version to bump, select either `major` or `minor` (see [Semantic Versioning](https://semver.org/))
1818
7. Finally, once all inputs are checked press the *Run Workflow* button
1919
8. **Manually** create a release branch by selecting `master` in the branch dropdown and entering the branch name:
2020

21-
![Create a release branch](./.github/images/)
21+
![Create a release branch](./.github/images/release-branch.png)
2222

2323
### Release a new bugfix version
2424

25-
> **Warning**
26-
> This process is currently only semi-automated and involves manual execution of the steps defined in [`ci-release.yaml`](.github/workflows/ci-release.yaml).
27-
> Besides NPM, the [GitHub CLI](https://cli.github.com/) is required. Ensure the CLI is configured for authenticated use (`gh auth login`).
28-
2925
1. Ensure the current state in the release branch is ready to be released
30-
2. Clone the repository and checkout the release branch:
31-
```shell
32-
git clone https://github.com/DependencyTrack/frontend
33-
cd frontend
34-
git checkout 4.6.x
35-
```
36-
3. Run `npm version` to automatically bump the project version, commit and tag this change:
37-
```shell
38-
npm version patch -m "prepare-release: set version to %s"
39-
```
40-
4. Push this change:
41-
```shell
42-
git push origin
43-
```
44-
5. Create a GitHub release:
45-
```shell
46-
VERSION=`jq -r '.version' package.json`
47-
gh release create "${VERSION}" --title "${VERSION}" --notes-file ".github/default-release-notes.md"
48-
```
49-
6. This will kick off the `ci-publish.yaml` workflow, which will build and push the container images, as well as update the previously created release with build artifacts
26+
2. Head over to the *Actions* tab in GitHub
27+
3. Select the *Release CI* entry in the *Workflows* section
28+
4. The following UI element will have a button to trigger the workflow. Once clicked, the Use workflow from dialog will appear:
29+
30+
![Create a release from a release branch](./.github/images/release-releasebranch.png)
31+
32+
5. Ensure that a release branch (e.g. `4.6.x`) is selected in the branch dropdown
33+
6. For the part of the version to bump, select `patch` (see [Semantic Versioning](https://semver.org/))
34+
7. Finally, once all inputs are checked press the *Run Workflow* button

0 commit comments

Comments
 (0)