Fix Rename Step Syntax

This commit is contained in:
jklingen 2025-07-22 18:43:19 +02:00 committed by GitHub
commit c18e7e959b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -136,8 +136,8 @@ jobs:
- name: Rename installer for non-release branch - name: Rename installer for non-release branch
if: env.IS_RELEASE_BRANCH != 'true' if: env.IS_RELEASE_BRANCH != 'true'
run: | run: |
$branch = "${{ github.ref }}" -replace '^refs/heads/', '' branch="${BRANCH_NAME:-${GITHUB_REF#refs/heads/}}"
$sanitized = $branch -replace '[^a-zA-Z0-9._-]', '_' sanitized=$(echo "$branch" | sed 's/[^a-zA-Z0-9._-]/_/g')
mv drop/Greenshot-INSTALLER-*.exe "drop/Greenshot-INSTALLER-${sanitized}.exe" mv drop/Greenshot-INSTALLER-*.exe "drop/Greenshot-INSTALLER-${sanitized}.exe"
shell: bash shell: bash