Skip to content

Commit

Permalink
Update release-windows.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
huangliu authored Feb 23, 2024
1 parent 4e8fd64 commit 89ad14b
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions .github/workflows/release-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,7 @@ jobs:
- name: Compress portable binary
working-directory: ./build/bin
run: Compress-Archive "Tiny RDM.exe" tiny-rdm.zip

- name: Rename zip package
working-directory: ./build/bin
run: Rename-Item -Path "tiny-rdm.zip" -NewName "TinyRDM_Portable_${{ steps.normalise_version.outputs.version }}_${{ steps.normalise_platform.outputs.tag }}.zip"
run: Compress-Archive "Tiny RDM.exe" "TinyRDM_Portable_${{ steps.normalise_version.outputs.version }}_${{ steps.normalise_platform.outputs.tag }}.zip"

- name: Upload release asset (Portable)
uses: softprops/action-gh-release@v1
Expand All @@ -84,21 +80,15 @@ jobs:

- name: Build Windows NSIS installer
shell: bash
run: CGO_ENABLED=1 wails build -clean -platform ${{ matrix.platform }} -nsis -upx -webview2 embed -ldflags "-X main.version=${{ github.event.release.tag_name }}"

- name: Codesign Windows NSIS installer
working-directory: ./build/bin
run: |
echo "Creating certificate file"
New-Item -ItemType directory -Path certificate
Set-Content -Path certificate\certificate.txt -Value '${{ secrets.WIN_SIGNING_CERT }}'
certutil -decode certificate\certificate.txt certificate\certificate.pfx
echo "Signing TinyRDM installer"
& 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /fd sha256 /tr http://ts.ssl.com /f certificate\certificate.pfx /p '${{ secrets.WIN_SIGNING_CERT_PASSWORD }}' 'Tiny RDM.exe'
CGO_ENABLED=1 wails build -clean -platform ${{ matrix.platform }} \
-nsis -webview2 embed \
-ldflags "-X main.version=${{ github.event.release.tag_name }}"
-o "tinyrdm-installer.exe"
- name: Rename installer
working-directory: ./build/bin
run: Rename-Item -Path "Tiny RDM.exe" -NewName "TinyRDM_Setup_${{ steps.normalise_version.outputs.version }}_${{ steps.normalise_platform.outputs.tag }}.exe"
run: Rename-Item -Path "tinyrdm-installer.exe" -NewName "TinyRDM_Setup_${{ steps.normalise_version.outputs.version }}_${{ steps.normalise_platform.outputs.tag }}.exe"

- name: Upload release asset (Installer)
uses: softprops/action-gh-release@v1
Expand Down

0 comments on commit 89ad14b

Please sign in to comment.