Skip to content

Commit 8529188

Browse files
committed
sign windows artifacts before msix build
1 parent 33ae75f commit 8529188

File tree

2 files changed

+28
-31
lines changed

2 files changed

+28
-31
lines changed

.github/workflows/release.yaml

Lines changed: 27 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -95,16 +95,7 @@
9595
run: |
9696
(Get-Content -Path 'lib/utils/mortis.dart') -replace "kvpx7qkqjh", "$env:DANDANAPI_APPID" | Set-Content -Path 'lib/utils/mortis.dart'
9797
(Get-Content -Path 'lib/utils/mortis.dart') -replace "rABUaBLqdz7aCSi3fe88ZDj2gwga9Vax", "$env:DANDANAPI_KEY" | Set-Content -Path 'lib/utils/mortis.dart'
98-
- run: flutter build windows
99-
# - name: Download FFmpeg Assets
100-
# uses: dsaltares/fetch-gh-release-asset@master
101-
# with:
102-
# repo: 'Predidit/avbuild'
103-
# version: 'tags/1.1.0'
104-
# file: 'ffmpeg_windows_x64.zip'
105-
# token: ${{ secrets.GITHUB_TOKEN }}
106-
# - run: Remove-Item -Path build/windows/x64/runner/Release/ffmpeg-7.dll -Force
107-
# - run: Expand-Archive -LiteralPath ffmpeg_windows_x64.zip -DestinationPath build/windows/x64/runner/Release
98+
- run: flutter build windows
10899
- run: Compress-Archive build/windows/x64/runner/Release/* Kazumi_windows_${env:tag}.zip
109100
- name: Upload windows outputs
110101
uses: actions/upload-artifact@v4
@@ -114,6 +105,32 @@
114105
path: |
115106
Kazumi_windows_*.zip
116107
108+
# Sign Zip
109+
- run: New-Item -Path "build/windows/zip_signed_output" -ItemType Directory
110+
- name: sign windows zip
111+
uses: signpath/[email protected]
112+
with:
113+
api-token: '${{ secrets.SIGNPATH_API_TOKEN }}'
114+
organization-id: 'fa047255-4772-4be1-b14f-5cfa62635877'
115+
project-slug: 'Kazumi'
116+
signing-policy-slug: 'release-signing'
117+
artifact-configuration-slug: 'Packet'
118+
github-artifact-id: '${{ steps.unsigned-windows-zip-artifacts.outputs.artifact-id }}'
119+
wait-for-completion: true
120+
output-artifact-directory: 'build/windows/zip_signed_output'
121+
122+
- name: Upload windows zip signed ouputs
123+
uses: actions/upload-artifact@v4
124+
id: signed-windows-zip-artifacts
125+
with:
126+
name: windows_zip_signed_outputs
127+
path: build/windows/zip_signed_output/*.zip
128+
129+
# Replace Unpacked Artifact with Signed Artifact
130+
- name: Replace Unpacked Artifact with Signed Artifact
131+
run: Expand-Archive -Path "build/windows/zip_signed_output/Kazumi_windows_${env:tag}.zip" -DestinationPath "build/windows/x64/runner/Release" -Force
132+
133+
# Build Unsigned MSIX
117134
- name: Build unsigned msix
118135
run: dart run msix:create
119136
- name: Upload windows msix ouputs
@@ -145,27 +162,6 @@
145162
name: windows_msix_signed_outputs
146163
path: build/windows/msix_signed_output/*.msix
147164

148-
# Sign Zip
149-
- run: New-Item -Path "build/windows/zip_signed_output" -ItemType Directory
150-
- name: sign windows zip
151-
uses: signpath/[email protected]
152-
with:
153-
api-token: '${{ secrets.SIGNPATH_API_TOKEN }}'
154-
organization-id: 'fa047255-4772-4be1-b14f-5cfa62635877'
155-
project-slug: 'Kazumi'
156-
signing-policy-slug: 'release-signing'
157-
artifact-configuration-slug: 'Packet'
158-
github-artifact-id: '${{ steps.unsigned-windows-zip-artifacts.outputs.artifact-id }}'
159-
wait-for-completion: true
160-
output-artifact-directory: 'build/windows/zip_signed_output'
161-
162-
- name: Upload windows zip signed ouputs
163-
uses: actions/upload-artifact@v4
164-
id: signed-windows-zip-artifacts
165-
with:
166-
name: windows_zip_signed_outputs
167-
path: build/windows/zip_signed_output/*.zip
168-
169165
flutter-build-linux:
170166
name: "Release for Linux"
171167
runs-on: "ubuntu-latest"

pubspec.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ msix_config:
190190
logo_path: assets/images/logo/logo_rounded.png
191191
sign_msix: false
192192
install_certificate: false
193+
build_windows: false
193194

194195
# The following section is specific to Flutter packages.
195196
flutter:

0 commit comments

Comments
 (0)