Skip to content

Commit

Permalink
Update workflows.
Browse files Browse the repository at this point in the history
  • Loading branch information
MeowZWR committed Feb 18, 2025
1 parent 29f6a83 commit d064683
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
on:
push:
tags:
- cn_*
- '*-cn'
- '!testing_*'

jobs:
build:
Expand All @@ -24,11 +25,11 @@ jobs:
Expand-Archive -Force latest.zip "$env:AppData\XIVLauncher\addon\Hooks\dev"
- name: Build
run: |
$ver = '${{ github.ref_name }}' -replace 'cn_'
$ver = '${{ github.ref_name }}' -replace '-cn'
invoke-expression 'dotnet build --no-restore --configuration Release --nologo -p:Version=$ver -p:FileVersion=$ver -p:AssemblyVersion=$ver'
- name: write version into jsons
run: |
$ver = '${{ github.ref_name }}' -replace 'cn_'
$ver = '${{ github.ref_name }}' -replace '-cn'
$path = './Glamourer/bin/Release/Glamourer.json'
$json = Get-Content -Raw $path | ConvertFrom-Json
$json.AssemblyVersion = $ver
Expand Down Expand Up @@ -65,11 +66,11 @@ jobs:
- name: Write out repo.json
run: |
$ver = '${{ github.ref_name }}'
$verNoPrefix = $ver -replace '^cn_', ''
$verBase = $ver -replace '-cn$', ''
$path = './repo.json'
$json = Get-Content -Raw $path | ConvertFrom-Json
$json[0].AssemblyVersion = $verNoPrefix
$json[0].TestingAssemblyVersion = $verNoPrefix
$json[0].AssemblyVersion = $verBase
$json[0].TestingAssemblyVersion = $verBase
$json[0].DownloadLinkInstall = $json.DownloadLinkInstall -replace '[^/]+/Glamourer.zip',"$ver/Glamourer.zip"
$json[0].DownloadLinkTesting = $json.DownloadLinkTesting -replace '[^/]+/Glamourer.zip',"$ver/Glamourer.zip"
$json[0].DownloadLinkUpdate = $json.DownloadLinkUpdate -replace '[^/]+/Glamourer.zip',"$ver/Glamourer.zip"
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Create Test Release
on:
push:
tags:
- cn_testing_*
- 'testing_*-cn'

jobs:
build:
Expand All @@ -24,11 +24,11 @@ jobs:
Expand-Archive -Force latest.zip "$env:AppData\XIVLauncher\addon\Hooks\dev"
- name: Build
run: |
$ver = '${{ github.ref_name }}' -replace 'cn_testing_'
$ver = '${{ github.ref_name }}' -replace '^testing_' -replace '-cn$'
invoke-expression 'dotnet build --no-restore --configuration Debug --nologo -p:Version=$ver -p:FileVersion=$ver -p:AssemblyVersion=$ver'
- name: write version into json
run: |
$ver = '${{ github.ref_name }}' -replace 'cn_testing_'
$ver = '${{ github.ref_name }}' -replace '^testing_' -replace '-cn$'
$path = './Glamourer/bin/Debug/Glamourer.json'
$json = Get-Content -Raw $path | ConvertFrom-Json
$json.AssemblyVersion = $ver
Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
- name: Write out repo.json
run: |
$verT = '${{ github.ref_name }}'
$ver = $verT -replace 'cn_testing_'
$ver = $verT -replace '^testing_' -replace '-cn$'
$path = './repo.json'
$json = Get-Content -Raw $path | ConvertFrom-Json
$json[0].TestingAssemblyVersion = $ver
Expand Down

0 comments on commit d064683

Please sign in to comment.