Skip to content

Commit 63de694

Browse files
author
liuchuancong
committed
fix(*)
1 parent 0f3f909 commit 63de694

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

.github/workflows/release.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,18 @@ jobs:
7070
uses: actions/checkout@v4
7171
with:
7272
ref: ${{ github.event.inputs.tag_name || github.ref }}
73-
73+
74+
- name: Decode MSIX Certificate
75+
shell: pwsh
76+
run: |
77+
$certBase64 = "${{ secrets.CERTIFICATE }}"
78+
if ([string]::IsNullOrEmpty($certBase64)) { Write-Error "Secret CERTIFICATE is empty!"; exit 1 }
79+
$certBytes = [System.Convert]::FromBase64String($certBase64)
80+
81+
$certPath = Join-Path -Path (Get-Location) -ChildPath "CERTIFICATE.pfx"
82+
[IO.File]::WriteAllBytes($certPath, $certBytes)
83+
84+
echo "MSIX_CERT_PATH=$certPath" >> $env:GITHUB_ENV
7485
- name: 设置Flutter环境
7586
uses: subosito/flutter-action@v2
7687
with:
@@ -100,17 +111,6 @@ jobs:
100111
- name: Install fastforge
101112
run: dart pub global activate fastforge
102113

103-
- name: Decode MSIX Certificate
104-
shell: pwsh
105-
run: |
106-
$certBase64 = "${{ secrets.CERTIFICATE }}"
107-
if ([string]::IsNullOrEmpty($certBase64)) { Write-Error "Secret CERTIFICATE is empty!"; exit 1 }
108-
$certBytes = [System.Convert]::FromBase64String($certBase64)
109-
110-
$certPath = Join-Path -Path (Get-Location) -ChildPath "CERTIFICATE.pfx"
111-
[IO.File]::WriteAllBytes($certPath, $certBytes)
112-
113-
echo "MSIX_CERT_PATH=$certPath" >> $env:GITHUB_ENV
114114
- name: Get version from pubspec.yaml
115115
id: get_version
116116
shell: pwsh

0 commit comments

Comments
 (0)