Skip to content

Commit

Permalink
build: add input to release workflow (#653)
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinayagarwal authored Oct 25, 2023
1 parent 0207319 commit a97b6f3
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ name: Release

on:
workflow_dispatch:
inputs:
candidate:
type: choice
description: Choose a candidate
options:
- RC
- GA

env:
JAVAFX_VERSION: '21'
Expand Down Expand Up @@ -37,14 +44,16 @@ jobs:
id: vars
shell: bash
run: |
mvn -B versions:set -DremoveSnapshot
mvn -B -ntp -q versions:set -DremoveSnapshot -DgenerateBackupPoms=false
PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
APP_VERSION=$PROJECT_VERSION
S3_PATH=$PROJECT_VERSION
if [[ "$PROJECT_VERSION" == *-RC* ]]; then
APP_VERSION=`echo $PROJECT_VERSION | cut -d- -f1`
CANDIDATE=${{ github.event.inputs.candidate }}
if [[ "$CANDIDATE" == RC ]]; then
PROJECT_VERSION=${PROJECT_VERSION}-RC
S3_PATH=RC/$PROJECT_VERSION
fi
echo "Releasing.. "$PROJECT_VERSION
echo ::set-output name=APP_VERSION::$APP_VERSION
echo ::set-output name=PROJECT_VERSION::$PROJECT_VERSION
echo ::set-output name=S3_PATH::$S3_PATH
Expand Down

0 comments on commit a97b6f3

Please sign in to comment.