mirror of
https://github.com/ShareX/ShareX.git
synced 2024-09-30 01:07:21 +13:00
Patch AssemblyInfo version
This commit is contained in:
parent
69ca568501
commit
99b21e47c0
1 changed files with 10 additions and 5 deletions
15
.github/workflows/build.yml
vendored
15
.github/workflows/build.yml
vendored
|
@ -43,11 +43,16 @@ jobs:
|
||||||
|
|
||||||
- name: Get app version
|
- name: Get app version
|
||||||
id: get_app_version
|
id: get_app_version
|
||||||
if: matrix.configuration == 'Release'
|
|
||||||
run: |
|
run: |
|
||||||
$content = Get-Content "${{ env.ASSEMBLY_INFO_PATH }}"
|
$content = Get-Content "${{ env.ASSEMBLY_INFO_PATH }}" -Raw
|
||||||
$match = [regex]::Match($content, 'AssemblyVersion\("([0-9]+(?:\.[0-9]+){1,3})"\)')
|
$pattern = 'Version\("([0-9]+(?:\.[0-9]+){1,3})"\)'
|
||||||
|
$match = [regex]::Match($content, $pattern)
|
||||||
$version = $match.Groups[1].Value
|
$version = $match.Groups[1].Value
|
||||||
|
if ($env:GITHUB_REF -eq "refs/heads/develop") {
|
||||||
|
$version = "$version.$env:GITHUB_RUN_NUMBER"
|
||||||
|
$content = [regex]::Replace($content, $pattern, "Version(`"$version`")")
|
||||||
|
Set-Content -Path "${{ env.ASSEMBLY_INFO_PATH }}" -Value "$content" -NoNewline
|
||||||
|
}
|
||||||
echo $version
|
echo $version
|
||||||
echo "APP_VERSION=$version" >> $env:GITHUB_OUTPUT
|
echo "APP_VERSION=$version" >> $env:GITHUB_OUTPUT
|
||||||
|
|
||||||
|
@ -191,8 +196,8 @@ jobs:
|
||||||
with:
|
with:
|
||||||
repository: ${{ env.REPO_DEV_BUILDS }}
|
repository: ${{ env.REPO_DEV_BUILDS }}
|
||||||
token: ${{ env.CUSTOM_GITHUB_TOKEN }}
|
token: ${{ env.CUSTOM_GITHUB_TOKEN }}
|
||||||
tag_name: v${{ env.APP_VERSION }}.${{ github.run_number }}
|
tag_name: v${{ env.APP_VERSION }}
|
||||||
name: ShareX ${{ env.APP_VERSION }}.${{ github.run_number }} Dev
|
name: ShareX ${{ env.APP_VERSION }} Dev
|
||||||
body_path: ${{ env.RELEASE_BODY_PATH }}
|
body_path: ${{ env.RELEASE_BODY_PATH }}
|
||||||
draft: false
|
draft: false
|
||||||
prerelease: false
|
prerelease: false
|
||||||
|
|
Loading…
Reference in a new issue