Skip to content

Commit 25e2429

Browse files
committed
release: TRACEX-XXX create release 14.0.0
1 parent 294bf7c commit 25e2429

File tree

1 file changed

+11
-28
lines changed

1 file changed

+11
-28
lines changed

.github/workflows/release.yaml

Lines changed: 11 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,84 +5,67 @@ on:
55
push:
66
tags:
77
- '[0-9]+.[0-9]+.[0-9]+'
8-
- '[0-9]+.[0-9]+.[0-9]+-*'
98

109
env:
1110
JAVA_VERSION: 17
12-
# Specific CHANGELOG file which is used for releasing the product. Default <CHANGELOG.md>.
13-
CHANGELOG_PATH: 'CHANGELOG.md'
14-
HELM_CHANGELOG_PATH: 'charts/traceability-foss/CHANGELOG.md'
15-
CHARTS_YAML_PATH: 'charts/traceability-foss/Chart.yaml'
16-
CHARTS_YAML_FE_PATH: 'charts/traceability-foss/charts/frontend/Chart.yaml'
1711

1812
jobs:
1913
release:
2014
runs-on: ubuntu-latest
21-
permissions:
22-
pull-requests: write
23-
contents: write
2415
steps:
25-
26-
- uses: actions/create-github-app-token@v1
27-
id: generate-token
28-
with:
29-
app-id: ${{ secrets.TRACE_X_RELEASE_DOCUMENTATION_GH_APP_ID }}
30-
private-key: ${{ secrets.TRACE_X_RELEASE_DOCUMENTATION_GH_APP_PRIVATE_KEY }}
31-
3216
- uses: actions/checkout@v4
3317

3418
- name: Calculate Helm release version from CHANGELOG
35-
run: echo HELM_VERSION=$(cat ${{ env.HELM_CHANGELOG_PATH }} | sed -n 's/.*\[\([0-9]\+\.[0-9]\+\.[0-9]\+\)\].*/\1/p' | head -n 1) >> $GITHUB_ENV
19+
run: echo HELM_VERSION=$(cat charts/traceability-foss/CHANGELOG.md | sed -n 's/.*\[\([0-9]\+\.[0-9]\+\.[0-9]\+\)\].*/\1/p' | head -n 1) >> $GITHUB_ENV
3620

3721
- name: Update Chart.yaml appVersion
3822
uses: mikefarah/[email protected]
3923
with:
40-
cmd: yq -i eval '.appVersion = "${{ github.ref_name }}"' ${{ env.CHARTS_YAML_PATH }}
24+
cmd: yq -i eval '.appVersion = "${{ github.ref_name }}"' charts/traceability-foss/Chart.yaml
4125

4226
- name: Update Chart.yaml version
4327
uses: mikefarah/[email protected]
4428
with:
45-
cmd: yq -i eval '.version = "${{ env.HELM_VERSION }}"' ${{ env.CHARTS_YAML_PATH }}
29+
cmd: yq -i eval '.version = "${{ env.HELM_VERSION }}"' charts/traceability-foss/Chart.yaml
4630

4731
- name: Update frontend dependency version in Chart.yaml
4832
uses: mikefarah/[email protected]
4933
with:
50-
cmd: yq -i eval '.dependencies[0].version = "${{ env.HELM_VERSION }}"' ${{ env.CHARTS_YAML_PATH }}
34+
cmd: yq -i eval '.dependencies[0].version = "${{ env.HELM_VERSION }}"' charts/traceability-foss/Chart.yaml
5135

5236
- name: Update backend dependency version in Chart.yaml
5337
uses: mikefarah/[email protected]
5438
with:
55-
cmd: yq -i eval '.dependencies[1].version = "${{ env.HELM_VERSION }}"' ${{ env.CHARTS_YAML_PATH }}
39+
cmd: yq -i eval '.dependencies[1].version = "${{ env.HELM_VERSION }}"' charts/traceability-foss/Chart.yaml
5640

5741
- name: Update frontend version in frontend/Chart.yaml
5842
uses: mikefarah/[email protected]
5943
with:
60-
cmd: yq -i eval '.version = "${{ env.HELM_VERSION }}"' ${{ env.CHARTS_YAML_FE_PATH }}
44+
cmd: yq -i eval '.version = "${{ env.HELM_VERSION }}"' charts/traceability-foss/charts/frontend/Chart.yaml
6145

6246
- name: Update frontend appVersion in frontend/Chart.yaml
6347
uses: mikefarah/[email protected]
6448
with:
65-
cmd: yq -i eval '.appVersion = "${{ github.ref_name }}"' ${{ env.CHARTS_YAML_FE_PATH }}
49+
cmd: yq -i eval '.appVersion = "${{ github.ref_name }}"' charts/traceability-foss/charts/frontend/Chart.yaml
6650

6751
- name: Update backend version in backend/Chart.yaml
6852
uses: mikefarah/[email protected]
6953
with:
70-
cmd: yq -i eval '.version = "${{ env.HELM_VERSION }}"' ${{ env.CHARTS_YAML_FE_PATH }}
54+
cmd: yq -i eval '.version = "${{ env.HELM_VERSION }}"' charts/traceability-foss/charts/backend/Chart.yaml
7155

7256
- name: Update backend appVersion in frontend/Chart.yaml
7357
uses: mikefarah/[email protected]
7458
with:
75-
cmd: yq -i eval '.appVersion = "${{ github.ref_name }}"' ${{ env.CHARTS_YAML_FE_PATH }}
59+
cmd: yq -i eval '.appVersion = "${{ github.ref_name }}"' charts/traceability-foss/charts/backend/Chart.yaml
7660

7761
- name: Update the frontend package.json appVersion
7862
run: |
7963
sudo npm install -g json
8064
sudo json -I -f frontend/package.json -e "this.version='${{ github.ref_name }}'"
8165
8266
- name: Prepare Helm release
83-
uses: peter-evans/create-pull-request@v7
67+
uses: peter-evans/create-pull-request@v6
8468
with:
85-
token: ${{ steps.generate-token.outputs.token }}
8669
commit-message: "chore(release): Prepare release for Helm version ${{ env.HELM_VERSION }}"
8770
branch: chore/prepare-helm-release-${{ env.HELM_VERSION }}
8871
base: main
@@ -101,7 +84,7 @@ jobs:
10184
run: |
10285
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
10386
echo "CHANGELOG<<$EOF" >> $GITHUB_ENV
104-
sed -n -e '/## \[${{ github.ref_name }}\]/,/## \[/ p' ${{ env.CHANGELOG_PATH }} | head -n -1 | tail -n +2 >> $GITHUB_ENV
87+
sed -n -e '/## \[${{ github.ref_name }}\]/,/## \[/ p' CHANGELOG.md | head -n -1 | tail -n +2 >> $GITHUB_ENV
10588
echo **Full Changelog**: ${{ github.server_url }}/${{ github.repository }}/compare/${{ env.PREVIOUS_VERSION }}...${{ github.ref_name }} >> $GITHUB_ENV
10689
echo "$EOF" >> "$GITHUB_ENV"
10790

0 commit comments

Comments
 (0)