Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
waltkb committed Oct 24, 2024
2 parents dc8a0f7 + 2d4973b commit 48c6b8c
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ name: Deploy manually to test environment

on:
workflow_dispatch:

inputs:
release_version:
description: 'Custom version'
required: false
jobs:
build:
name: "Deploy to test environment"
Expand All @@ -16,9 +19,15 @@ jobs:
- uses: actions/checkout@v3
- name: Calculate release version
run: |
BRANCH=$(echo ${{ github.ref }} | sed -e 's/refs\/heads\///' -e 's/\//-/g')
echo "BRANCH=${BRANCH}" >> $GITHUB_ENV
echo "release_version=1.0.$(date +'%g%m%d%H%M')-${BRANCH}" >> $GITHUB_ENV
if [ "${{ inputs.release_version }}" == "" ]; then
echo "Using computed value"
BRANCH=$(echo ${{ github.ref }} | sed -e 's/refs\/heads\///' -e 's/\//-/g')
echo "BRANCH=${BRANCH}" >> $GITHUB_ENV
echo "release_version=1.0.$(date +'%g%m%d%H%M')-${BRANCH}" >> $GITHUB_ENV
else
echo "Using provided input"
echo "release_version=${{ inputs.release_version }}" >> $GITHUB_ENV
fi
- name: Set version
run: |
sed -i "s/1.0.0-SNAPSHOT/${{ env.release_version }}/g" build.gradle.kts
Expand Down

0 comments on commit 48c6b8c

Please sign in to comment.