Skip to content

Commit e4eeb7f

Browse files
authored
Update build_app.yaml
1 parent e558645 commit e4eeb7f

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

.github/workflows/build_app.yaml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ env:
1010
jobs:
1111
release:
1212
runs-on: ubuntu-latest
13+
outputs:
14+
output: ${{ steps.get_latest_release.outputs.updated }}
1315
steps:
1416
- name: Get latest release
1517
id: get_latest_release
@@ -20,7 +22,7 @@ jobs:
2022
exit 1
2123
fi
2224
- name: Publish pre-release
23-
if: env.updated == 'true'
25+
if: ${{ steps.get_latest_release.outputs.updated }} == 'true'
2426
uses: softprops/action-gh-release@v1
2527
with:
2628
token: ${{ secrets.LIBRESCORE_TOKEN }}
@@ -180,22 +182,22 @@ Installation instructions are in the [README](https://github.com/LibreScore/${{
180182
flutter build windows --obfuscate --split-debug-info=.\build\app\outputs\symbols
181183
"${{ secrets.LIBRESCORE_PFX }}" > .\installer\LibreScore.pfx.base64
182184
certutil -decode .\installer\LibreScore.pfx.base64 .\installer\LibreScore.pfx
183-
& "${env:ProgramFiles(x86)}\Windows Kits\10\bin\10.0.22000.0\x64\signtool.exe" sign /f .\installer\LibreScore.pfx /p ${{ secrets.LIBRESCORE_PFX_PASSWORD }} /tr http://timestamp.sectigo.com/ /fd SHA256 /td SHA256 .\build\windows\runner\Release\librescore.exe
184-
Get-ChildItem -Path .\build\windows\runner\Release -File | Where {($_.Extension -ne ".dll" -and $_.Extension -ne ".exe")} | Remove-Item
185-
Copy-Item (& "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -find 'VC\Redist\MSVC\*\x64\*\msvcp140.dll') .\build\windows\runner\Release
186-
Copy-Item (& "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -find 'VC\Redist\MSVC\*\x64\*\vcruntime140.dll') .\build\windows\runner\Release
187-
Copy-Item (& "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -find 'VC\Redist\MSVC\*\x64\*\vcruntime140_1.dll') .\build\windows\runner\Release
185+
& "${env:ProgramFiles(x86)}\Windows Kits\10\bin\10.0.22000.0\x64\signtool.exe" sign /f .\installer\LibreScore.pfx /p ${{ secrets.LIBRESCORE_PFX_PASSWORD }} /tr http://timestamp.sectigo.com/ /fd SHA256 /td SHA256 .\build\windows\x64\runner\Release\librescore.exe
186+
Get-ChildItem -Path .\build\windows\x64\runner\Release -File | Where {($_.Extension -ne ".dll" -and $_.Extension -ne ".exe")} | Remove-Item
187+
Copy-Item (& "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -find 'VC\Redist\MSVC\*\x64\*\msvcp140.dll') .\build\windows\x64\runner\Release
188+
Copy-Item (& "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -find 'VC\Redist\MSVC\*\x64\*\vcruntime140.dll') .\build\windows\x64\runner\Release
189+
Copy-Item (& "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -find 'VC\Redist\MSVC\*\x64\*\vcruntime140_1.dll') .\build\windows\x64\runner\Release
188190
dart run msix:create
189191
& "${env:ProgramFiles(x86)}\Windows Kits\10\bin\10.0.22000.0\x64\signtool.exe" sign /f .\installer\LibreScore.pfx /p ${{ secrets.LIBRESCORE_PFX_PASSWORD }} /tr http://timestamp.sectigo.com/ /fd SHA256 /td SHA256 .\installer\LibreScore.msix
190192
Start-Process iexpress -ArgumentList /N,.\installer\MSIX\LibreScoreMsix.sed -NoNewWindow -Wait
191193
& "${env:ProgramFiles(x86)}\Windows Kits\10\bin\10.0.22000.0\x64\signtool.exe" sign /f .\installer\LibreScore.pfx /p ${{ secrets.LIBRESCORE_PFX_PASSWORD }} /tr http://timestamp.sectigo.com/ /fd SHA256 /td SHA256 .\installer\LibreScoreMsix.exe
192-
Copy-Item -Path .\build\windows\runner\Release -Destination .\installer\Inno\LibreScore -Recurse
194+
Copy-Item -Path .\build\windows\x64\runner\Release -Destination .\installer\Inno\LibreScore -Recurse
193195
New-Item -Name .\installer\Inno\LibreScore\data\flutter_assets\assets\.inno
194196
iscc .\installer\Inno\LibreScore.iss
195197
& "${env:ProgramFiles(x86)}\Windows Kits\10\bin\10.0.22000.0\x64\signtool.exe" sign /f .\installer\LibreScore.pfx /p ${{ secrets.LIBRESCORE_PFX_PASSWORD }} /tr http://timestamp.sectigo.com/ /fd SHA256 /td SHA256 .\installer\LibreScoreInno.exe
196198
Start-Process iexpress -ArgumentList /N,.\installer\LibreScore.sed -NoNewWindow -Wait
197199
& "${env:ProgramFiles(x86)}\Windows Kits\10\bin\10.0.22000.0\x64\signtool.exe" sign /f .\installer\LibreScore.pfx /p ${{ secrets.LIBRESCORE_PFX_PASSWORD }} /tr http://timestamp.sectigo.com/ /fd SHA256 /td SHA256 .\installer\LibreScore.exe
198-
Compress-Archive -Path .\build\windows\runner\Release\* -DestinationPath .\installer\LibreScore.zip
200+
Compress-Archive -Path .\build\windows\x64\runner\Release\* -DestinationPath .\installer\LibreScore.zip
199201
- name: Upload EXE
200202
if: matrix.os == 'windows-latest'
201203
uses: softprops/action-gh-release@v1
@@ -236,7 +238,7 @@ Installation instructions are in the [README](https://github.com/LibreScore/${{
236238
runs-on: ubuntu-latest
237239
steps:
238240
- name: Delete pre-release
239-
if: env.updated == 'true'
241+
if: ${{needs.release.outputs.updated}} == 'true'
240242
run: |
241243
ID_A="$(curl -s -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.LIBRESCORE_TOKEN }}" https://api.github.com/repos/LibreScore/${{ secrets.LIBRESCORE_REPO_A }}/releases/tags/${{ github.ref_name }} | jq -r .id)"
242244
curl -s -X DELETE -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.LIBRESCORE_TOKEN }}" https://api.github.com/repos/LibreScore/${{ secrets.LIBRESCORE_REPO_A }}/releases/$ID_A
@@ -245,6 +247,6 @@ Installation instructions are in the [README](https://github.com/LibreScore/${{
245247
curl -s -X DELETE -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.LIBRESCORE_TOKEN }}" https://api.github.com/repos/LibreScore/${{ secrets.LIBRESCORE_REPO_B }}/releases/$ID_B
246248
curl -s -X DELETE -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.LIBRESCORE_TOKEN }}" https://api.github.com/repos/LibreScore/${{ secrets.LIBRESCORE_REPO_B }}/git/refs/tags/${{ github.ref_name }}
247249
- name: Delete workflow run
248-
if: env.updated == 'false'
250+
if: ${{needs.release.outputs.updated}} == 'false'
249251
run: |
250252
curl -s -i -u ${{ secrets.LIBRESCORE_USERNAME }}:${{ secrets.LIBRESCORE_TOKEN }} -d '{"event_type":"delete_action","client_payload":{"run_id":"'"${{ github.run_id }}"'","repo":"LibreScore/app-librescore"}}' -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/LibreScore/actions/dispatches

0 commit comments

Comments
 (0)