Skip to content

Commit

Permalink
chore: fix release process issues
Browse files Browse the repository at this point in the history
Signed-off-by: Ahmed AbouZaid <6760103+aabouzaid@users.noreply.github.com>
  • Loading branch information
aabouzaid committed Jul 25, 2024
1 parent 1fcb413 commit 00e3d3c
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 12 deletions.
11 changes: 7 additions & 4 deletions .github/config/release-please/release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,19 @@
"bump-minor-pre-major": false,
"prerelease": false,
"draft": false,
"last-release-sha": "e098c6f7f1d6870acde813b2d38f3db33f89e662",
"packages": {
"charts/camunda-platform-latest": {
"release-type": "helm",
"extra-label": "version/8.5,automation/release-please,release/pr,kind/chore,chart/camunda-platform",
"component": "camunda-platform",
"component": "camunda-platform-latest",
"include-v-in-tag": false
},
"charts/camunda-platform-8.4": {
"last-release-sha": "e098c6f7f1d6870acde813b2d38f3db33f89e662",
"release-type": "helm",
"extra-label": "version/8.4,automation/release-please,release/pr,kind/chore,chart/camunda-platform",
"component": "camunda-platform",
"component": "camunda-platform-8.4",
"include-v-in-tag": false,
"extra-files": [
{
Expand All @@ -26,9 +28,10 @@
]
},
"charts/camunda-platform-8.3": {
"last-release-sha": "e098c6f7f1d6870acde813b2d38f3db33f89e662",
"release-type": "helm",
"extra-label": "version/8.3,automation/release-please,release/pr,kind/chore,chart/camunda-platform",
"component": "camunda-platform",
"component": "camunda-platform-8.3",
"include-v-in-tag": false,
"extra-files": [
{
Expand All @@ -41,7 +44,7 @@
"charts/camunda-platform-8.2": {
"release-type": "helm",
"extra-label": "version/8.2,automation/release-please,release/pr,kind/chore,chart/camunda-platform",
"component": "camunda-platform",
"component": "camunda-platform-8.2",
"include-v-in-tag": false,
"extra-files": [
{
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/chart-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ permissions:
contents: write
pull-requests: write

env:
RELEASE_PLEASE_CONFIG_FILE: .github/config/release-please/release-please-config.json
RELEASE_PLEASE_MANIFEST_FILE: .github/config/release-please/.release-please-manifest.json

jobs:
release-please:
name: Run Release Please
Expand All @@ -24,5 +28,5 @@ jobs:
with:
token: '${{ steps.generate-github-token.outputs.token }}'
# Config docs: https://github.com/googleapis/release-please/blob/main/docs/manifest-releaser.md
config-file: .github/config/release-please/release-please-config.json
manifest-file: .github/config/release-please/.release-please-manifest.json
config-file: "${{ env.RELEASE_PLEASE_CONFIG_FILE }}"
manifest-file: "${{ env.RELEASE_PLEASE_MANIFEST_FILE }}"
4 changes: 2 additions & 2 deletions .github/workflows/chart-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,11 @@ jobs:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
# The verification step happens in the "release" branch before merging into the "main" branch.
# The verification step happens in the release branch before merging into the "main" branch.
fetch-depth: 0
ref: release-please--branches--main
- name: Install env dependencies
uses: asdf-vm/actions/install@05e0d2ed97b598bfce82fd30daf324ae0c4570e6 # v3
# NOTE: This simple test is under review. So it could fail (it should be fixed in that case).
- name: Simple smoke test
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3
with:
Expand Down
6 changes: 2 additions & 4 deletions scripts/generate-release-notes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ main () {
chart_file="${chart_dir}/Chart.yaml"
chart_name="$(yq '.name' ${chart_file})"
chart_version="$(yq '.version' ${chart_file})"
chart_version_previous="$(git show main:${chart_file} | yq '.version')"
chart_tag="${chart_name}-${chart_version}"
chart_tag_previous="${chart_name}-${chart_version_previous}"

#
# Early exit if the tag already exists.
Expand All @@ -26,10 +24,10 @@ main () {
# Generate RELEASE-NOTES.md file (used for Github release notes and ArtifactHub "changes" annotation).
git-chglog \
--output "${chart_dir}/RELEASE-NOTES.md" \
--tag-filter-pattern "${chart_tag}" \
--tag-filter-pattern "${chart_name}" \
--next-tag "${chart_tag}" \
--path "${chart_dir}" \
"${chart_tag_previous}".."${chart_tag}"
"${chart_tag}"

#
# Update ArtifactHub "changes" annotation in the Chart.yaml file.
Expand Down

0 comments on commit 00e3d3c

Please sign in to comment.