Skip to content

Commit aec3139

Browse files
author
Guy Fankam
committed
Add checkout step and prerelease check to release workflow
1 parent e608d94 commit aec3139

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

.github/workflows/create_github_release.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ jobs:
232232
steps:
233233
- name: Download artifacts
234234
uses: actions/download-artifact@v4
235+
235236
- name: Create release
236237
uses: softprops/action-gh-release@v1
237238
with:
@@ -257,6 +258,10 @@ jobs:
257258
name: APIOps Toolkit for Azure APIM ${{ github.event.inputs.Release_Version }}
258259
tag_name: ${{ github.event.inputs.Release_Version }}
259260
generate_release_notes: true
261+
262+
- name: Checkout repository
263+
uses: actions/checkout@v5
264+
260265
- name: Create release
261266
env:
262267
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -265,10 +270,18 @@ jobs:
265270
run: |
266271
set -euo pipefail
267272
273+
# Check if this is prerelease
274+
VERSION="${RELEASE_TAG#v}" # strip leading "v" if present
275+
PRERELEASE_FLAG=""
276+
if [[ "$VERSION" == *-* ]]; then
277+
PRERELEASE_FLAG="--prerelease"
278+
fi
279+
268280
# Create the release
269281
gh release create "$RELEASE_TAG" \
270282
--title "APIOps Toolkit for Azure APIM $RELEASE_TAG" \
271283
--generate-notes \
284+
$PRERELEASE_FLAG \
272285
--draft \
273286
--target "$COMMIT_ID"
274287

0 commit comments

Comments
 (0)