Skip to content

Commit 5aa5bea

Browse files
akkoayaclaude
andcommitted
ci: remove all secrets dependencies from release workflow
Remove DanDan API injection, SignPath code signing, and APK signing steps to simplify the release pipeline. All artifacts are now published unsigned directly to GitHub Releases. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 808b440 commit 5aa5bea

1 file changed

Lines changed: 18 additions & 117 deletions

File tree

.github/workflows/release.yaml

Lines changed: 18 additions & 117 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,6 @@
4444
- name: Get Flutter dependencies
4545
run: flutter pub get
4646
shell: bash
47-
- name: Inject DanDan API Credentials
48-
run: |
49-
sed -i "s/kvpx7qkqjh/${{ secrets.DANDANAPI_APPID }}/g" lib/utils/mortis.dart
50-
sed -i "s/rABUaBLqdz7aCSi3fe88ZDj2gwga9Vax/${{ secrets.DANDANAPI_KEY }}/g" lib/utils/mortis.dart
5147
- name: Build Flutter for Android
5248
run: flutter build apk --split-per-abi
5349
shell: bash
@@ -88,79 +84,24 @@
8884
distribution: 'temurin'
8985
java-version: '18'
9086
- run: flutter pub get
91-
- name: Inject DanDan API Credentials
92-
env:
93-
DANDANAPI_APPID: ${{ secrets.DANDANAPI_APPID }}
94-
DANDANAPI_KEY: ${{ secrets.DANDANAPI_KEY }}
95-
run: |
96-
(Get-Content -Path 'lib/utils/mortis.dart') -replace "kvpx7qkqjh", "$env:DANDANAPI_APPID" | Set-Content -Path 'lib/utils/mortis.dart'
97-
(Get-Content -Path 'lib/utils/mortis.dart') -replace "rABUaBLqdz7aCSi3fe88ZDj2gwga9Vax", "$env:DANDANAPI_KEY" | Set-Content -Path 'lib/utils/mortis.dart'
9887
- run: flutter build windows
9988
- run: Compress-Archive build/windows/x64/runner/Release/* Kazumi_windows_${env:tag}.zip
10089
- name: Upload windows outputs
10190
uses: actions/upload-artifact@v4
102-
id: unsigned-windows-zip-artifacts
10391
with:
10492
name: windows_outputs
10593
path: |
10694
Kazumi_windows_*.zip
10795
108-
# Sign Zip
109-
- run: New-Item -Path "build/windows/zip_signed_output" -ItemType Directory
110-
- name: sign windows zip
111-
uses: signpath/github-action-submit-signing-request@v1.1
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
134-
- name: Build unsigned msix
96+
# Build MSIX
97+
- name: Build msix
13598
run: dart run msix:create
136-
- name: Upload windows msix ouputs
99+
- name: Upload windows msix outputs
137100
uses: actions/upload-artifact@v4
138-
id: unsigned-windows-msix-artifacts
139101
with:
140102
name: windows_msix_outputs
141103
path: |
142104
build/windows/x64/runner/Release/kazumi.msix
143-
144-
# Sign MSIX
145-
- run: New-Item -Path "build/windows/msix_signed_output" -ItemType Directory
146-
- name: sign windows msix
147-
uses: signpath/github-action-submit-signing-request@v1.1
148-
with:
149-
api-token: '${{ secrets.SIGNPATH_API_TOKEN }}'
150-
organization-id: 'fa047255-4772-4be1-b14f-5cfa62635877'
151-
project-slug: 'Kazumi'
152-
signing-policy-slug: 'release-signing'
153-
artifact-configuration-slug: 'MSIX'
154-
github-artifact-id: '${{ steps.unsigned-windows-msix-artifacts.outputs.artifact-id }}'
155-
wait-for-completion: true
156-
output-artifact-directory: 'build/windows/msix_signed_output'
157-
158-
- name: Upload windows msix signed ouputs
159-
uses: actions/upload-artifact@v4
160-
id: signed-windows-msix-artifacts
161-
with:
162-
name: windows_msix_signed_outputs
163-
path: build/windows/msix_signed_output/*.msix
164105
165106
flutter-build-linux:
166107
name: "Release for Linux"
@@ -201,10 +142,6 @@
201142
- name: Get Flutter dependencies
202143
run: flutter pub get
203144
shell: bash
204-
- name: Inject DanDan API Credentials
205-
run: |
206-
sed -i "s/kvpx7qkqjh/${{ secrets.DANDANAPI_APPID }}/g" lib/utils/mortis.dart
207-
sed -i "s/rABUaBLqdz7aCSi3fe88ZDj2gwga9Vax/${{ secrets.DANDANAPI_KEY }}/g" lib/utils/mortis.dart
208145
- name: Build Flutter for Linux
209146
run: flutter build linux
210147
shell: bash
@@ -282,10 +219,6 @@
282219
channel: stable
283220
flutter-version-file: pubspec.yaml
284221
- run: flutter pub get
285-
- name: Inject DanDan API Credentials
286-
run: |
287-
sed -i '' "s/kvpx7qkqjh/${{ secrets.DANDANAPI_APPID }}/g" lib/utils/mortis.dart
288-
sed -i '' "s/rABUaBLqdz7aCSi3fe88ZDj2gwga9Vax/${{ secrets.DANDANAPI_KEY }}/g" lib/utils/mortis.dart
289222
- name: Build IPA
290223
run: |
291224
flutter build ios --release --no-codesign
@@ -319,10 +252,6 @@
319252
channel: stable
320253
flutter-version-file: pubspec.yaml
321254
- run: flutter pub get
322-
- name: Inject DanDan API Credentials
323-
run: |
324-
sed -i '' "s/kvpx7qkqjh/${{ secrets.DANDANAPI_APPID }}/g" lib/utils/mortis.dart
325-
sed -i '' "s/rABUaBLqdz7aCSi3fe88ZDj2gwga9Vax/${{ secrets.DANDANAPI_KEY }}/g" lib/utils/mortis.dart
326255
- run: flutter build macos --release
327256
- name: Create DMG
328257
run: |
@@ -348,49 +277,35 @@
348277
- name: Extract tag name
349278
run: echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
350279
shell: bash
351-
- name: Set up JDK 17
352-
uses: actions/setup-java@v4
353-
with:
354-
java-version: '17'
355-
distribution: 'temurin'
356-
- name: Setup Android SDK
357-
uses: android-actions/setup-android@v3
358-
- name: Setup Android build tools
359-
run: sdkmanager "build-tools;34.0.0"
360-
361280
- name: Download windows zip build file
362281
uses: actions/download-artifact@v4
363282
with:
364-
name: windows_zip_signed_outputs
365-
path: windows_zip_signed_outputs
283+
name: windows_outputs
284+
path: windows_outputs
366285
- name: List files in windows_outputs directory
367-
run: ls -l windows_zip_signed_outputs
286+
run: ls -l windows_outputs
368287
- name: Copy windows build file to root
369-
run: cp windows_zip_signed_outputs/* Kazumi_windows_${{ env.tag }}.zip
288+
run: cp windows_outputs/* Kazumi_windows_${{ env.tag }}.zip
370289

371290
- name: Download windows msix build file
372291
uses: actions/download-artifact@v4
373292
with:
374-
name: windows_msix_signed_outputs
375-
path: windows_msix_signed_outputs
376-
- name: List files in windows_msix_signed_outputs directory
377-
run: ls -l windows_msix_signed_outputs
378-
- name: Copy windows build file to root
379-
run: cp windows_msix_signed_outputs/* Kazumi_windows_${{ env.tag }}.msix
293+
name: windows_msix_outputs
294+
path: windows_msix_outputs
295+
- name: List files in windows_msix_outputs directory
296+
run: ls -l windows_msix_outputs
297+
- name: Copy windows msix build file to root
298+
run: cp windows_msix_outputs/* Kazumi_windows_${{ env.tag }}.msix
380299

381300
- name: Download android build file
382301
uses: actions/download-artifact@v4
383302
with:
384303
name: android_outputs
385-
path: android_outputs
304+
path: android_outputs
386305
- name: List files in android_outputs directory
387-
run: ls -l android_outputs
388-
- name: Copy android build file to unsigned floder
389-
run: |
390-
mkdir build
391-
mkdir build/unsigned
392-
mkdir build/signed
393-
cp android_outputs/* build/unsigned/Kazumi_android_${{ env.tag }}.apk
306+
run: ls -l android_outputs
307+
- name: Copy android build file to root
308+
run: cp android_outputs/* Kazumi_android_${{ env.tag }}.apk
394309

395310
- name: Download iOS build file
396311
uses: actions/download-artifact@v4
@@ -422,25 +337,11 @@
422337
- name: Copy linux build file to root
423338
run: cp linux_outputs/* .
424339

425-
- name: Sign APK
426-
id: sign_app
427-
uses: filippoLeporati93/android-release-signer@v1
428-
with:
429-
releaseDirectory: build/unsigned
430-
signingKeyBase64: ${{ secrets.SIGNING_KEY_BASE64 }}
431-
alias: ${{ secrets.KEY_ALIAS }}
432-
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
433-
env:
434-
BUILD_TOOLS_VERSION: "34.0.0"
435-
436-
- name: Copy Signed android build file
437-
run: cp ${{steps.sign_app.outputs.signedReleaseFile}} build/signed/Kazumi_android_${{ env.tag }}.apk
438-
439340
- name: Create release
440341
uses: softprops/action-gh-release@v2
441342
with:
442343
files: |
443-
build/signed/*.apk
344+
Kazumi_android_*.apk
444345
Kazumi_windows_*.zip
445346
Kazumi_windows_*.msix
446347
Kazumi_macos_*.dmg

0 commit comments

Comments
 (0)