Skip to content

Commit

Permalink
feat(config): enhance release visualization with version input and co…
Browse files Browse the repository at this point in the history
…nditional logic
  • Loading branch information
IhsenBouallegue committed Dec 13, 2024
1 parent 2d36a36 commit 7fd2916
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions .github/workflows/release-visualization.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ name: Release - Visualization

on:
workflow_dispatch:
inputs:
version:
description: 'Version to release (e.g., 1.131.3)'
required: true
type: string
pull_request:
types:
- closed
Expand All @@ -17,9 +22,11 @@ env:
jobs:
promote_and_release:
if: |
github.event.pull_request.merged == true &&
contains(github.event.pull_request.labels.*.name, 'release') &&
startsWith(github.event.pull_request.head.ref, 'release/vis-')
(github.event_name == 'workflow_dispatch') ||
(github.event_name == 'pull_request' &&
github.event.pull_request.merged == true &&
contains(github.event.pull_request.labels.*.name, 'release') &&
startsWith(github.event.pull_request.head.ref, 'release/vis-'))
name: Promote and Release
runs-on: ubuntu-latest
permissions:
Expand All @@ -32,8 +39,12 @@ jobs:

- name: Set version
run: |
BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
echo "VERSION=${BRANCH_NAME#release/vis-}" >> $GITHUB_ENV
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
echo "VERSION=${{ inputs.version }}" >> $GITHUB_ENV
else
BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
echo "VERSION=${BRANCH_NAME#release/vis-}" >> $GITHUB_ENV
fi
- name: Create tag
run: |
Expand Down

0 comments on commit 7fd2916

Please sign in to comment.