Skip to content

Commit 0ab5e39

Browse files
committed
Charles' review
1 parent 71d176f commit 0ab5e39

File tree

2 files changed

+25
-14
lines changed

2 files changed

+25
-14
lines changed

.github/workflows/perform-release.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313
type: boolean
1414

1515
env:
16-
MVN_CLI_ARGS: --batch-mode --no-transfer-progress --fail-at-end --show-version
16+
MVN_CLI_ARGS: --batch-mode --no-transfer-progress --fail-at-end --show-version -DskipTests
1717
JAVA_VERSION: 17
1818
DOCS_REPO: SAP/cloud-sdk
1919

@@ -70,6 +70,18 @@ jobs:
7070
sha: ${{ steps.determine-branch-names.outputs.RELEASE_COMMIT }}
7171
excluded-jobs: "[\"Run BlackDuck Scan\"]"
7272

73+
- name: "Check Whether Release Notes PR Can Be Merged"
74+
if: ${{ inputs.skip-pr-merge != 'true' }}
75+
uses: ./.github/actions/pr-is-mergeable
76+
with:
77+
pr-ref: ${{ steps.determine-branch-names.outputs.RELEASE_NOTES_BRANCH_NAME }}
78+
repo: ${{ env.DOCS_REPO }}
79+
token: ${{ secrets.BOT_SDK_JS_FOR_DOCS_REPO_PR }}
80+
excluded-check-runs: |
81+
{
82+
\"Build Cloud SDK Documentation\": [\"dependabot\"]
83+
}
84+
7385
release:
7486
name: "Release"
7587
needs: [ prerequisites ]
@@ -83,7 +95,6 @@ jobs:
8395
with:
8496
distribution: "sapmachine"
8597
java-version: ${{ env.JAVA_VERSION }}
86-
server-id: central
8798

8899
- name: "Download Release Asset"
89100
id: download-asset
@@ -106,7 +117,7 @@ jobs:
106117
107118
- name: "Deploy"
108119
run: |
109-
MVN_ARGS="${{ env.MVN_CLI_ARGS }} -Drelease -s settings.xml -e"
120+
MVN_ARGS="${{ env.MVN_CLI_ARGS }} -Drelease -s settings.xml"
110121
mvn deploy $MVN_ARGS
111122
env:
112123
MAVEN_GPG_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
@@ -121,3 +132,9 @@ jobs:
121132
run: gh release edit ${{ needs.prerequisites.outputs.release-tag }} --draft=false --repo "${{ github.repository }}"
122133
env:
123134
GH_TOKEN: ${{ secrets.BOT_SDK_JS_FOR_DOCS_REPO_PR }}
135+
136+
- name: "Merge Release Notes PR"
137+
if: ${{ inputs.skip-pr-merge != 'true' }}
138+
run: gh pr merge --squash "${{ needs.prerequisites.outputs.release-notes-branch }}" --delete-branch --repo "${{ env.DOCS_REPO }}"
139+
env:
140+
GH_TOKEN: ${{ secrets.BOT_SDK_JS_FOR_DOCS_REPO_PR }}

.github/workflows/prepare-release.yaml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@ jobs:
3434
uses: actions/checkout@v4
3535
with:
3636
ref: ${{ github.event.inputs.branch }}
37-
token: ${{ secrets.BOT_SDK_JS_FOR_DOCS_REPO_PR }} # this is needed so that the same token is used when pushing our changes later. Otherwise, our on: push workflows (i.e. our continuous integration) won't be triggered.
37+
38+
- name: "Prepare git"
39+
run: |
40+
git config --global user.email "[email protected]"
41+
git config --global user.name "SAP Cloud SDK Bot"
3842
3943
- name: "Determine Versions"
4044
id: determine-versions
@@ -46,11 +50,6 @@ jobs:
4650
- run: "echo Current Version: ${{ steps.determine-versions.outputs.CURRENT_SNAPSHOT }}"
4751
- run: "echo New Version: ${{ steps.determine-versions.outputs.NEW_SNAPSHOT }}"
4852

49-
- name: "Prepare git"
50-
run: |
51-
git config --global user.email "[email protected]"
52-
git config --global user.name "SAP Cloud SDK Bot"
53-
5453
- name: "Set Release Version to ${{ steps.determine-versions.outputs.RELEASE_VERSION }}"
5554
id: prepare-release
5655
run: |
@@ -137,11 +136,6 @@ jobs:
137136
MVN_ARGS="${{ env.MVN_MULTI_THREADED_ARGS }} clean install -DskipTests"
138137
mvn $MVN_ARGS
139138
140-
- name: "Prepare git"
141-
run: |
142-
git config --global user.email "[email protected]"
143-
git config --global user.name "SAP Cloud SDK Bot"
144-
145139
- name: "Create Release"
146140
id: create-release
147141
run: |

0 commit comments

Comments
 (0)