Skip to content

Commit c42dcf1

Browse files
Merge pull request buildpacks-community#1262 from buildpacks-community/update-release-process
Update release process to use tags and version branches
2 parents dec48da + 0e39e94 commit c42dcf1

3 files changed

Lines changed: 32 additions & 32 deletions

File tree

.github/actions/pack-build/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ runs:
4141
if: ${{ runner.os == 'linux' }}
4242
shell: bash
4343
run: |
44-
[[ $GITHUB_REF =~ ^refs\/heads\/release\/(.*)$ ]] && version=${BASH_REMATCH[1]} || version=0.0.0
44+
[[ $GITHUB_REF =~ ^refs\/tags\/v(.*)$ ]] && version=${BASH_REMATCH[1]} || version=0.0.0
4545
4646
KPACK_VERSION=$version
4747
KPACK_COMMIT=$GITHUB_SHA
@@ -65,7 +65,7 @@ runs:
6565
if: ${{ runner.os == 'windows' }}
6666
shell: bash
6767
run: |
68-
[[ $GITHUB_REF =~ ^refs\/heads\/release\/(.*)$ ]] && version=${BASH_REMATCH[1]} || version=0.0.0
68+
[[ $GITHUB_REF =~ ^refs\/tags\/v(.*)$ ]] && version=${BASH_REMATCH[1]} || version=0.0.0
6969
7070
KPACK_VERSION=$version
7171
KPACK_COMMIT=$GITHUB_SHA

.github/workflows/ci.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ on:
55
branches:
66
- main
77
- release/**
8-
pull_request:
9-
branches:
10-
- release/**
8+
tags:
9+
- v[0-9]+.[0-9]+.[0-9]+-?**
1110

1211
defaults:
1312
run:
@@ -428,7 +427,7 @@ jobs:
428427
- build-init-windows-image
429428
- completion-windows-image
430429
- lifecycle-image
431-
if: ${{ startsWith(github.ref, 'refs/heads/release/') }}
430+
if: ${{ startsWith(github.ref, 'refs/tag/v') }}
432431
runs-on: ubuntu-latest
433432
steps:
434433
- name: Checkout
@@ -458,10 +457,10 @@ jobs:
458457
username: ${{ secrets.REGISTRY_USER }}
459458
password: ${{ secrets.REGISTRY_PASSWORD }}
460459

461-
- name: Parse branch name
460+
- name: Parse tag name
462461
run: |
463462
echo "GITHUB_REF=${GITHUB_REF}"
464-
[[ $GITHUB_REF =~ ^refs\/heads\/release\/(.*)$ ]] && version=${BASH_REMATCH[1]}
463+
[[ $GITHUB_REF =~ ^refs\/tags\/v(.*)$ ]] && version=${BASH_REMATCH[1]}
465464
if [[ -z "${version}" ]]; then
466465
echo "ERROR: kpack version not detected."
467466
exit 1

RELEASE.md

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,46 @@
11
# Release Process
22

3-
Kpack release process is composed of 3 phases:
4-
- [Development](#development)
5-
- [Feature Complete](#feature-complete)
6-
- [Release Finalization](#release-finalization)
3+
Kpack release process:
4+
- [Releasing a new Major/Minor Version](#releasing-a-new-majorminor-version)
5+
- [Releasing a new Patch Version](#releasing-a-new-patch-version)
6+
- [Release Automation](#release-automation)
77

8-
## Phases
98

10-
### Development
9+
## Releasing a new Major/Minor Version
1110

12-
Our development flow is detailed in [Development](DEVELOPMENT.md).
13-
14-
### Feature Complete
15-
16-
During this period, a **Release Candidate** (RC) is published and used for further User Acceptance testing (`UAT`). Furthermore, additional RCs may be published based on assessment by the `kpack` maintainers of the **impact**, **effort** and **risk** of including the changes in the upcoming release. Any other changes may be merged into the `main` branch through the normal process, and will make it into the next release.
17-
18-
To produce the release candidate a maintainer will:
19-
- Create a new release branch in form `release/<MAYOR-VERSION>.<MINOR-VERSION>.<PATCH-VERSION>-rc.<NUMBER>` yielding a draft GitHub release to be published.
11+
To produce a major/minor release from `main` a maintainer will:
12+
- Create a new release branch in form `release/<MAJOR-VERSION>.<MINOR-VERSION>.x` from the `main` branch
13+
- Tag release branch as `v<MAYOR-VERSION>.<MINOR-VERSION>.<PATCH-VERSION>` or `v<MAYOR-VERSION>.<MINOR-VERSION>.<PATCH-VERSION>-rc.<NUMBER>` for RC versions
14+
- GitHub Actions will generate a draft GitHub release.
2015
- Publish the [GitHub release][release]:
21-
- Tag release branch as `v<MAYOR-VERSION>.<MINOR-VERSION>.<PATCH-VERSION>-rc.<NUMBER>`.
22-
- Release should be marked as "pre-release".
16+
- For RCs, the release should be marked as "pre-release"
17+
>NOTE: A **Release Candidate** (RC) is published and used for further User Acceptance testing (`UAT`). Furthermore, additional RCs may be published based on assessment by the `kpack` maintainers of the **impact**, **effort** and **risk** of including the changes in the upcoming release. Any other changes may be merged into the `main` branch through the normal process, and will make it into the next release.
2318
- The GitHub release will contain the following:
2419
- **artifacts**
2520
- **release notes**
21+
- **asset checksums**
2622
- The release notes should be edited and cleaned
2723

28-
### Release Finalization
24+
## Releasing a new Patch Version
25+
26+
>Patches may be released for backwards-compatible bug fixes and/or dependency bumps to resolve vulnerabilities. There is no patch guarantees for anything other than the latest minor version.
2927
30-
The maintainer will:
31-
- Create a new release branch in form `release/<MAYOR-VERSION>.<MINOR-VERSION>.<PATCH-VERSION>` yielding a draft GitHub release to be published.
32-
- Publish the [GitHub release][release] while tagging the release branch as `v<VERSION>`.
33-
- Tag release branch as `v<MAYOR-VERSION>.<MINOR-VERSION>.<PATCH-VERSION>`.
28+
To produce a patch release from an existing `release` branch a maintainer will:
29+
- PR changes into the release branch corresponding to the minor that will be patched.
30+
- Tag release branch as `v<MAYOR-VERSION>.<MINOR-VERSION>.<PATCH-VERSION>` or `v<MAYOR-VERSION>.<MINOR-VERSION>.<PATCH-VERSION>-rc.<NUMBER>` for RC versions
31+
- GitHub Actions will generate a draft GitHub release.
32+
- Publish the [GitHub release][release]:
33+
- For RCs, the release should be marked as "pre-release"
34+
>NOTE: A **Release Candidate** (RC) is published and used for further User Acceptance testing (`UAT`). Furthermore, additional RCs may be published based on assessment by the `kpack` maintainers of the **impact**, **effort** and **risk** of including the changes in the upcoming release. Any other changes may be merged into the `main` branch through the normal process, and will make it into the next release.
3435
- The GitHub release will contain the following:
3536
- **artifacts**
3637
- **release notes**
37-
38-
And with that, you're done!
38+
- **asset checksums**
39+
- The release notes should be edited and cleaned
3940

4041
## Release automation
4142

42-
- The release candidate process is automated using [GitHub Actions][github-release]. The workflow is triggered by a push to a release branch.
43+
- The release candidate process is automated using [GitHub Actions][github-release]. The workflow is triggered by a pushed version tag.
4344
- The release finalization is manual step
4445

4546
[release]: https://github.com/pivotal/kpack/releases

0 commit comments

Comments
 (0)