|
8 | 8 |
|
9 | 9 | jobs:
|
10 | 10 |
|
11 |
| - portable-build: |
| 11 | + portable: |
12 | 12 | runs-on: windows-2019
|
13 | 13 | steps:
|
14 | 14 | - uses: actions/checkout@v4
|
| 15 | + |
15 | 16 | - uses: ./.github/build
|
| 17 | + id: build |
16 | 18 | with:
|
17 | 19 | configuration: Release
|
18 | 20 | flavor: Portable
|
19 | 21 | artifact: release_artifact_portable
|
20 | 22 |
|
21 |
| - portable-publish: |
22 |
| - runs-on: windows-2019 |
23 |
| - needs: portable-build |
24 |
| - steps: |
25 |
| - - name: Collect artifact |
26 |
| - uses: actions/download-artifact@v4 |
27 |
| - with: |
28 |
| - name: release_artifact_portable |
29 |
| - path: release_artifact_portable |
30 | 23 | - name: Create zip
|
31 |
| - run: Compress-Archive -Path release_artifact_portable/* -Destination release_artifact_portable.zip |
32 |
| - #run: tar -cvzf release_artifact_portable.tar.gz -C release_artifact_portable * |
| 24 | + run: Compress-Archive -Path ${{steps.build.outputs.path}}/* -Destination release_artifact_portable_unsigned.zip |
| 25 | + |
33 | 26 | - name: Upload release artifact
|
34 | 27 | uses: actions/upload-release-asset@v1
|
35 | 28 | env:
|
36 | 29 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
37 | 30 | with:
|
38 | 31 | upload_url: ${{ github.event.release.upload_url }}
|
39 |
| - asset_path: release_artifact_portable.zip |
40 |
| - asset_name: PasteIntoFile_${{ github.event.release.tag_name }}_portable.zip |
| 32 | + asset_path: release_artifact_portable_unsigned.zip |
| 33 | + asset_name: PasteIntoFile_${{ github.event.release.tag_name }}_portable_unsigned.zip |
| 34 | + asset_content_type: application/zip |
| 35 | + |
| 36 | + - name: Sign with Signpath |
| 37 | + |
| 38 | + with: |
| 39 | + api-token: '${{ secrets.SIGNPATH_API_TOKEN }}' |
| 40 | + organization-id: '030bee06-17be-4a2a-a788-9efdbd14a889' |
| 41 | + project-slug: 'PasteIntoFile' |
| 42 | + signing-policy-slug: 'release-signing' |
| 43 | + artifact-configuration-slug: 'portable' |
| 44 | + github-artifact-id: '${{ steps.build.outputs.artifact-id }}' |
| 45 | + parameters: | |
| 46 | + version: "${{ steps.build.outputs.version }}" |
| 47 | + wait-for-completion: true |
| 48 | + output-artifact-directory: 'signing_result' |
| 49 | + |
| 50 | + - name: Create zip |
| 51 | + run: Compress-Archive -Path signing_result/* -Destination release_artifact_portable_signed.zip |
| 52 | + |
| 53 | + - name: Upload signed release artifact |
| 54 | + uses: actions/upload-release-asset@v1 |
| 55 | + env: |
| 56 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 57 | + with: |
| 58 | + upload_url: ${{ github.event.release.upload_url }} |
| 59 | + asset_path: release_artifact_portable_signed.zip |
| 60 | + asset_name: PasteIntoFile_${{ github.event.release.tag_name }}_portable_signed.zip |
41 | 61 | asset_content_type: application/zip
|
42 | 62 |
|
43 | 63 | installer:
|
44 | 64 | runs-on: windows-2019
|
45 | 65 | steps:
|
46 | 66 | - name: Checkout
|
47 | 67 | uses: actions/checkout@v4
|
| 68 | + |
48 | 69 | - name: Build program executable
|
49 | 70 | id: build
|
50 | 71 | uses: ./.github/build
|
51 | 72 | with:
|
52 | 73 | configuration: Release
|
53 | 74 | flavor: Installer
|
| 75 | + |
54 | 76 | - name: Add WiX toolkit to PATH
|
55 | 77 | shell: bash
|
56 | 78 | run: echo "${WIX}bin" >> $GITHUB_PATH
|
| 79 | + |
57 | 80 | - name: Build MSI file with WiX toolchain
|
58 | 81 | run: |
|
59 | 82 | cd Installer
|
60 | 83 | heat dir ../${{steps.build.outputs.path}} -dr INSTALLFOLDER -ag -cg ReleaseFragment -ke -srd -sfrag -nologo -pog:Binaries -pog:Documents -pog: Satellites -pog:Sources -pog:Content -t releaseFiles.xslt -out releaseFiles.wxs
|
61 | 84 | candle releaseFiles.wxs
|
62 | 85 | candle PasteIntoFile.wxs
|
63 | 86 | light -b ../${{steps.build.outputs.path}} releaseFiles.wixobj PasteIntoFile.wixobj -ext WixNetFxExtension -out Installer.msi
|
| 87 | +
|
64 | 88 | - name: Upload release artifact
|
65 | 89 | uses: actions/upload-release-asset@v1
|
66 | 90 | env:
|
67 | 91 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
68 | 92 | with:
|
69 | 93 | upload_url: ${{ github.event.release.upload_url }}
|
70 | 94 | asset_path: Installer/Installer.msi
|
71 |
| - asset_name: PasteIntoFile_${{ github.event.release.tag_name }}_installer.msi |
| 95 | + asset_name: PasteIntoFile_${{ github.event.release.tag_name }}_installer_unsigned.msi |
72 | 96 | asset_content_type: application/msi
|
73 | 97 |
|
| 98 | + |
| 99 | + - name: Upload artifact for signing |
| 100 | + id: upload |
| 101 | + uses: actions/upload-artifact@v4 |
| 102 | + with: |
| 103 | + path: Installer/Installer.msi |
| 104 | + |
| 105 | + - name: Sign with Signpath |
| 106 | + |
| 107 | + with: |
| 108 | + api-token: '${{ secrets.SIGNPATH_API_TOKEN }}' |
| 109 | + organization-id: '030bee06-17be-4a2a-a788-9efdbd14a889' |
| 110 | + project-slug: 'PasteIntoFile' |
| 111 | + signing-policy-slug: 'release-signing' |
| 112 | + artifact-configuration-slug: 'installer-zip' |
| 113 | + github-artifact-id: '${{ steps.upload.outputs.artifact-id }}' |
| 114 | + parameters: | |
| 115 | + version: "${{ steps.build.outputs.version }}" |
| 116 | + wait-for-completion: true |
| 117 | + output-artifact-directory: 'signing_result' |
| 118 | + |
| 119 | + - name: Upload signed release artifact |
| 120 | + uses: actions/upload-release-asset@v1 |
| 121 | + env: |
| 122 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 123 | + with: |
| 124 | + upload_url: ${{ github.event.release.upload_url }} |
| 125 | + asset_path: signing_result/Installer.msi |
| 126 | + asset_name: PasteIntoFile_${{ github.event.release.tag_name }}_installer_signed.msi |
| 127 | + asset_content_type: application/msi |
| 128 | + |
0 commit comments