Build release binary for testing build

This commit is contained in:
RisaDev
2024-01-11 22:00:43 +03:00
parent 461c6a9d90
commit 2f133a9fbc

View File

@@ -25,22 +25,22 @@ jobs:
- name: Build - name: Build
run: | run: |
$ver = '${{ github.ref_name }}' -replace 'testing_' $ver = '${{ github.ref_name }}' -replace 'testing_'
invoke-expression 'dotnet build --no-restore --configuration Debug --nologo -p:Version=$ver -p:FileVersion=$ver -p:AssemblyVersion=$ver' invoke-expression 'dotnet build --no-restore --configuration Release --nologo -p:Version=$ver -p:FileVersion=$ver -p:AssemblyVersion=$ver'
- name: write version into json - name: write version into json
run: | run: |
$ver = '${{ github.ref_name }}' -replace 'testing_' $ver = '${{ github.ref_name }}' -replace 'testing_'
$path = './CustomizePlus/bin/Debug/CustomizePlus.json' $path = './CustomizePlus/bin/Release/CustomizePlus.json'
$json = Get-Content -Raw $path | ConvertFrom-Json $json = Get-Content -Raw $path | ConvertFrom-Json
$json.AssemblyVersion = $ver $json.AssemblyVersion = $ver
$content = $json | ConvertTo-Json $content = $json | ConvertTo-Json
set-content -Path $path -Value $content set-content -Path $path -Value $content
- name: Archive - name: Archive
run: Compress-Archive -Path CustomizePlus/bin/Debug/* -DestinationPath CustomizePlus.zip run: Compress-Archive -Path CustomizePlus/bin/Release/* -DestinationPath CustomizePlus.zip
- name: Upload a Build Artifact - name: Upload a Build Artifact
uses: actions/upload-artifact@v2.2.1 uses: actions/upload-artifact@v2.2.1
with: with:
path: | path: |
./CustomizePlus/bin/Debug/* ./CustomizePlus/bin/Release/*
- name: Create Release - name: Create Release
id: create_release id: create_release
uses: actions/create-release@v1 uses: actions/create-release@v1