mirror of
https://github.com/greenshot/greenshot
synced 2025-08-21 22:13:23 -07:00
Extract version in pwsh
This commit is contained in:
parent
70a6b27e07
commit
33483aa6a2
1 changed files with 9 additions and 4 deletions
13
.github/workflows/release.yml
vendored
13
.github/workflows/release.yml
vendored
|
@ -62,11 +62,16 @@ jobs:
|
|||
Picasa_ClientId: ${{ secrets.Picasa_ClientId }}
|
||||
Picasa_ClientSecret: ${{ secrets.Picasa_ClientSecret }}
|
||||
|
||||
- name: Extract version
|
||||
- name: Extract version from file name
|
||||
id: extract_version
|
||||
run: |
|
||||
FILE_NAME=$(ls Greenshot-INSTALLER-*.exe | head -n 1)
|
||||
VERSION=$(echo "$FILE_NAME" | sed -E 's/Greenshot-INSTALLER-([0-9]+\.[0-9]+\.[0-9]+)-.*/\1/')
|
||||
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
||||
$file = Get-ChildItem drop -Filter "Greenshot-INSTALLER-*.exe" | Select-Object -First 1
|
||||
if ($file -match "Greenshot-INSTALLER-([\d\.]+).*\.exe") {
|
||||
echo "VERSION=$($matches[1])" >> $GITHUB_ENV
|
||||
} else {
|
||||
throw "Version number could not be extracted from file name: $file"
|
||||
}
|
||||
shell: pwsh
|
||||
|
||||
|
||||
- name: Create tag
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue