Skip to content

Commit ee51346

Browse files
committed
[skip ci] Adjust CI workflow to Github ones
1 parent 41d6311 commit ee51346

File tree

8 files changed

+127
-61
lines changed

8 files changed

+127
-61
lines changed

.github/workflows/release-signed.yml

Lines changed: 85 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,18 @@ name: Publish Signed Builds
44

55
on:
66
workflow_dispatch:
7-
inputs:
8-
branch:
9-
description: 'Specify branch name (preview/stable/github-signpath-test)'
10-
required: true
11-
default: 'github-signpath-test'
127

138
env:
149
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
1510
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
1611
DOTNET_INSTALL_DIR: '.\.dotnet'
17-
DOTNET_VERSION: '9.x'
12+
DOTNET_VERSION: '9.0.3xx'
1813
DOTNET_QUALITY: 'ga'
1914
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
20-
SIGNPATH_ARTIFACT_SLUG: 'initial' # change this to 'aot-release' when releasing with AOT
15+
SIGNPATH_ARTIFACT_SLUG: 'initial' # change this to 'aot-release' when releasing with AOT or 'initial' for normal release
16+
BUILD_PROFILE_PREVIEW: 'Publish-PreviewRelease'
17+
BUILD_PROFILE_STABLE: 'Publish-StableRelease'
18+
BUILD_PROFILE_DEBUG: 'Publish-DebugCIRelease'
2119

2220
# schedule:
2321
# - cron: '0 0 * * 0' # At 00:00 on Sunday
@@ -28,48 +26,44 @@ jobs:
2826
strategy:
2927
matrix:
3028
platform: [x64]
31-
framework: [net9.0-windows10.0.22621.0]
29+
framework: [net9.0-windows10.0.26100.0]
3230

3331
env:
3432
CONFIGURATION_STRATEGY: ""
3533
PUBLISH_PROFILE: ""
3634
SIGNING_POLICY_SLUG: ""
3735
VERSION: ""
3836
Platform: ${{ matrix.platform }}
39-
37+
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
4038

4139
steps:
4240
- name: Set Configuration and Environment Variables
4341
id: set_env
4442
run: |
45-
if ($env:GITHUB_EVENT_NAME -eq "workflow_dispatch") {
46-
$branch = $env:GITHUB_EVENT_INPUTS_BRANCH
47-
} else {
48-
$branch = $env:GITHUB_REF_NAME
49-
}
43+
$branch = $env:GITHUB_REF_NAME
5044
5145
if ($branch -eq "preview") {
5246
echo "CONFIGURATION_STRATEGY=Release" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
53-
echo "PUBLISH_PROFILE=Publish-PreviewRelease" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
47+
echo "PUBLISH_PROFILE=${{ env.BUILD_PROFILE_PREVIEW }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
5448
echo "SIGNING_POLICY_SLUG=release-signing" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
5549
} elseif ($branch -eq "stable") {
5650
echo "CONFIGURATION_STRATEGY=Publish" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
57-
echo "PUBLISH_PROFILE=Publish-StableRelease" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
51+
echo "PUBLISH_PROFILE=${{ env.BUILD_PROFILE_STABLE }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
5852
echo "SIGNING_POLICY_SLUG=release-signing" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
5953
} elseif ($branch -eq "github-signpath-test") {
6054
echo "CONFIGURATION_STRATEGY=Debug" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
61-
echo "PUBLISH_PROFILE=Publish-DebugCIRelease" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
62-
echo "SIGNING_POLICY_SLUG=test-signing" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
55+
echo "PUBLISH_PROFILE=${{ env.BUILD_PROFILE_DEBUG }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
56+
echo "SIGNING_POLICY_SLUG=test-signing-ci" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
6357
} else {
6458
Write-Error "Unknown branch or input: $branch"
6559
exit 1
6660
}
6761
6862
- name: Print env
6963
run: |
70-
echo Configuration Strategy: $env:CONFIGURATION_STRATEGY
71-
echo Publish Profile: $env:PUBLISH_PROFILE
72-
echo Signing Policy: $env:SIGNING_POLICY_SLUG
64+
echo "::notice::Configuration Strategy: $env:CONFIGURATION_STRATEGY"
65+
echo "::notice::Publish Profile: $env:PUBLISH_PROFILE"
66+
echo "::notice::Signing Policy: $env:SIGNING_POLICY_SLUG"
7367
7468
- name: Checkout
7569
uses: actions/checkout@v4
@@ -86,13 +80,20 @@ jobs:
8680

8781
- name: Build
8882
run: |
83+
dotnet workload update
8984
dotnet publish CollapseLauncher -c ${{ env.CONFIGURATION_STRATEGY }} -p:PublishProfile=${{ env.PUBLISH_PROFILE }} -p:PublishDir=".\build\"
9085
9186
- name: Prepare publish artifacts
9287
run: |
88+
cd CollapseLauncher
9389
.\build\CollapseLauncher.exe generatevelopackmetadata
94-
$version = ((Get-Item .\build\CollapseLauncher.exe).VersionInfo.FileVersion).TrimEnd(".0")
95-
echo Build version: $version
90+
91+
$version = ((Get-Item .\build\CollapseLauncher.exe).VersionInfo.FileVersion)
92+
if ($version.EndsWith(".0")) {
93+
$version = $version.Substring(0, $version.Length - 2)
94+
}
95+
96+
echo "::notice::Build version: $version"
9697
echo "VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
9798
mkdir SignArtifact
9899
mkdir SignArtifact\BuildArtifact-$version
@@ -102,47 +103,90 @@ jobs:
102103
id: upload-unsigned-artifact
103104
uses: actions/upload-artifact@v4
104105
with:
105-
name: collapse_${{ env.SIGNING_POLICY_SLUG }}-${{ env.CONFIGURATION_STRATEGY }}_${{ env.PUBLISH_PROFILE }}
106+
name: collapse-v${{ env.VERSION }}_${{ env.SIGNING_POLICY_SLUG }}-${{ env.CONFIGURATION_STRATEGY }}_${{ env.PUBLISH_PROFILE }}
106107
path: ./CollapseLauncher/SignArtifact
107108
compression-level: 9
108109

110+
- name: Notify Discord for pending build
111+
uses: sarisia/[email protected]
112+
if: always()
113+
continue-on-error: true
114+
with:
115+
webhook: ${{ secrets.DISCORD_WEBHOOK_CIRELEASENOTIFIER }}
116+
title: Collapse Launcher Release CI build is PENDING!
117+
nofail: true
118+
color: 0xFF0000
119+
url: https://github.com/CollapseLauncher/Collapse/actions/runs/${{ github.run_id }}
120+
description: |
121+
Commit `${{ github.sha }}` by ${{ github.actor }} in branch `${{ github.ref_name }}`
122+
Version: ${{ env.VERSION }}
123+
[Click here to view the run](https://github.com/CollapseLauncher/Collapse/actions/runs/${{ github.run_id }})
124+
For core maintainers, go to SignPath to sign the build!
125+
109126
- name: Sign Build Artifact with SignPath
110-
uses: signpath/github-action-submit-signing-request@v1.1
127+
uses: signpath/github-action-submit-signing-request@v1.3
111128
with:
112129
api-token: '${{ secrets.SIGNPATH_API_TOKEN }}'
113130
organization-id: ${{ secrets.SIGNPATH_ORG_ID }}
114131
project-slug: 'Collapse'
115132
signing-policy-slug: ${{ env.SIGNING_POLICY_SLUG }}
116133
github-artifact-id: '${{ steps.upload-unsigned-artifact.outputs.artifact-id }}'
117134
wait-for-completion: true
118-
output-artifact-directory: '/SignedArtifact/'
135+
wait-for-completion-timeout-in-seconds: 1200
136+
output-artifact-directory: '${{ runner.temp }}/SignedArtifact/'
137+
artifact-configuration-slug: ${{ env.SIGNPATH_ARTIFACT_SLUG}}
119138

120139
- name: Process Signed Build
121140
run: |
122-
$buildDir = '\SignedArtifact\BuildArtifact-${{ env.VERSION }}'
123-
echo Re-checking build version
124-
echo ((Get-Item $buildDir\CollapseLauncher.exe).VersionInfo.FileVersion).TrimEnd(".0")
141+
$buildDir = '${{ runner.temp }}\SignedArtifact\BuildArtifact-${{ env.VERSION }}'
142+
echo "Re-checking build version"
143+
$versionFinal = ((Get-Item $buildDir\CollapseLauncher.exe).VersionInfo.FileVersion)
144+
if ($versionFinal.EndsWith(".0")) {
145+
$versionFinal = $versionFinal.Substring(0, $versionFinal.Length - 2)
146+
}
147+
echo "::notice::Final build version: $versionFinal"
148+
echo "VERSION=$versionFinal" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
149+
150+
- name: Verify Signed Artifacts
151+
run: |
152+
$buildDir = '${{ runner.temp }}\SignedArtifact\BuildArtifact-${{ env.VERSION }}'
153+
$files = Get-ChildItem -Path "$buildDir" -Recurse -Include "*.exe","*.dll"
154+
foreach ($file in $files) {
155+
$signature = Get-AuthenticodeSignature $file.FullName
156+
if ($signature.Status -ne "Valid") {
157+
echo "::error::Invalid signature on $($file.Name): $($signature.Status)"
158+
}
159+
echo "✓ $($file.Name): $($signature.SignerCertificate.Subject)"
160+
}
125161
126162
- name: Re-upload Signed Artifact to GitHub
127163
uses: actions/upload-artifact@v4
128164
with:
129-
name: (SIGNED)collapse_${{ env.SIGNING_POLICY_SLUG }}-${{ env.CONFIGURATION_STRATEGY }}_${{ env.PUBLISH_PROFILE }}
130-
path: /SignedArtifact
165+
name: SIGNED_collapse-v${{ env.VERSION }}_${{ env.SIGNING_POLICY_SLUG }}-${{ env.CONFIGURATION_STRATEGY }}_${{ env.PUBLISH_PROFILE }}
166+
path: ${{ runner.temp }}/SignedArtifact
131167
compression-level: 9
132168

133-
notify-discord:
134-
runs-on: ubuntu-latest
135-
if: always()
136-
needs: [build]
137-
steps:
138-
- name: Notify Discord
139-
uses: sarisia/[email protected]
169+
- name: Final Notify Discord
170+
uses: sarisia/[email protected]
140171
if: always()
141172
continue-on-error: true
142173
with:
143-
webhook: ${{ secrets.DISCORD_WEBHOOK_NIGHTLY }}
144-
title: Collapse Launcher CI build is complete!
174+
webhook: ${{ secrets.DISCORD_WEBHOOK_CIRELEASENOTIFIER }}
175+
title: Collapse Launcher Release CI build is complete!
145176
status: ${{ job.status }}
177+
nofail: true
178+
url: https://github.com/CollapseLauncher/Collapse/actions/runs/${{ github.run_id }}
146179
description: |
147-
Commit `${{ github.sha }}` by ${{ github.actor }}
180+
Commit `${{ github.sha }}` by ${{ github.actor }} in branch `${{ github.ref_name }}`
148181
Click [here](https://nightly.link/CollapseLauncher/Collapse/actions/runs/${{ github.run_id }}) to download!
182+
183+
- name: Install Sentry CLI
184+
uses: MinoruSekine/[email protected]
185+
with:
186+
buckets: extras
187+
apps: sentry-cli
188+
189+
- name: Upload Debug artifact to Sentry
190+
run: |
191+
sentry-cli debug-files upload --org collapse --project collapse-launcher --include-sources '.\SignedArtifact\BuildArtifact-${{ env.VERSION }}'
192+

CollapseLauncher/packages.lock.json

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,12 @@
105105
"resolved": "0.41.3",
106106
"contentHash": "BB+2H62tQNcLU4depukiuok96UMqV4zOAtSGPM4UiO1OKbgEnpmIscHVJ4qir1LWjWzODLugfD8qs2RWxmA9JA=="
107107
},
108+
"Microsoft.DotNet.ILCompiler": {
109+
"type": "Direct",
110+
"requested": "[9.0.7, )",
111+
"resolved": "9.0.7",
112+
"contentHash": "FpvJ2rCpj2CB/4hZt0cmB3hCPMNZV2vrisQis3hR9itTEjLzeggi0AShrgJIZ5+3Y7433K7ESSsJ6+8T+nE2nQ=="
113+
},
108114
"Microsoft.Extensions.DependencyInjection.Abstractions": {
109115
"type": "Direct",
110116
"requested": "[9.0.7, )",
@@ -131,9 +137,9 @@
131137
},
132138
"Microsoft.NET.ILLink.Tasks": {
133139
"type": "Direct",
134-
"requested": "[9.0.3, )",
135-
"resolved": "9.0.3",
136-
"contentHash": "1rqGTfubVg0qj2PsK6esyq3PIxtYJYrN3LsYUV9RrvH3anmt3fT3ozYdAZZH4U8JU/pt5pPIUk8NBSu26wtekA=="
140+
"requested": "[9.0.7, )",
141+
"resolved": "9.0.7",
142+
"contentHash": "SZ1brSGoLnhLbE8QUZrtN6YwzN2gDT1wbx9qDBEfFFJcstiDTjJ6ygNuTPBV/K7SjGfx2YNbcJi5+ygbPOZpDg=="
137143
},
138144
"Microsoft.NETCore.Targets": {
139145
"type": "Direct",
@@ -601,9 +607,9 @@
601607
"dependencies": {
602608
"CommunityToolkit.Common": "[8.4.0, )",
603609
"CommunityToolkit.WinUI.Extensions": "[8.2.250402, )",
604-
"Microsoft.Web.WebView2": "[1.0.3344-prerelease, )",
605-
"Microsoft.Windows.SDK.BuildTools": "[10.0.26100.4188, )",
606-
"Microsoft.WindowsAppSDK": "[1.8.250515001-experimental2, )"
610+
"Microsoft.Web.WebView2": "[1.0.3415-prerelease, )",
611+
"Microsoft.Windows.SDK.BuildTools": "[10.0.26100.4654, )",
612+
"Microsoft.WindowsAppSDK": "[1.8.250702007-experimental4, )"
607613
}
608614
},
609615
"innosetuphelper": {
@@ -634,6 +640,15 @@
634640
"resolved": "0.5.0",
635641
"contentHash": "5Tw6O9sBDAN1aV+kpOSVvqvFk6Ahk6bYz0TTx3808Dp40M45gKTtzTzI9SS1VeAkljE6BAOeKaykpPnG36oOgw=="
636642
},
643+
"Microsoft.DotNet.ILCompiler": {
644+
"type": "Direct",
645+
"requested": "[9.0.7, )",
646+
"resolved": "9.0.7",
647+
"contentHash": "FpvJ2rCpj2CB/4hZt0cmB3hCPMNZV2vrisQis3hR9itTEjLzeggi0AShrgJIZ5+3Y7433K7ESSsJ6+8T+nE2nQ==",
648+
"dependencies": {
649+
"runtime.win-x64.Microsoft.DotNet.ILCompiler": "9.0.7"
650+
}
651+
},
637652
"Microsoft.Graphics.Win2D": {
638653
"type": "Direct",
639654
"requested": "[1.3.2, )",
@@ -683,6 +698,11 @@
683698
"Microsoft.WindowsAppSDK.Base": "1.8.250509001-experimental",
684699
"Microsoft.WindowsAppSDK.InteractiveExperiences": "1.8.250626001-experimental"
685700
}
701+
},
702+
"runtime.win-x64.Microsoft.DotNet.ILCompiler": {
703+
"type": "Transitive",
704+
"resolved": "9.0.7",
705+
"contentHash": "nftDR4604AcQawEWSfb7pcZWoNfaB+vnKQL3P2LUfzRoA8S6K+YObgotgJVNopMBMXLxQN0VSKGEdRa+WFlN/g=="
686706
}
687707
}
688708
}

Hi3Helper.CommunityToolkit/ImageCropper/packages.lock.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@
4141
},
4242
"Microsoft.NET.ILLink.Tasks": {
4343
"type": "Direct",
44-
"requested": "[9.0.3, )",
45-
"resolved": "9.0.3",
46-
"contentHash": "1rqGTfubVg0qj2PsK6esyq3PIxtYJYrN3LsYUV9RrvH3anmt3fT3ozYdAZZH4U8JU/pt5pPIUk8NBSu26wtekA=="
44+
"requested": "[9.0.7, )",
45+
"resolved": "9.0.7",
46+
"contentHash": "SZ1brSGoLnhLbE8QUZrtN6YwzN2gDT1wbx9qDBEfFFJcstiDTjJ6ygNuTPBV/K7SjGfx2YNbcJi5+ygbPOZpDg=="
4747
},
4848
"Microsoft.Web.WebView2": {
4949
"type": "Direct",

Hi3Helper.CommunityToolkit/SettingsControls/packages.lock.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
},
2121
"Microsoft.NET.ILLink.Tasks": {
2222
"type": "Direct",
23-
"requested": "[9.0.3, )",
24-
"resolved": "9.0.3",
25-
"contentHash": "1rqGTfubVg0qj2PsK6esyq3PIxtYJYrN3LsYUV9RrvH3anmt3fT3ozYdAZZH4U8JU/pt5pPIUk8NBSu26wtekA=="
23+
"requested": "[9.0.7, )",
24+
"resolved": "9.0.7",
25+
"contentHash": "SZ1brSGoLnhLbE8QUZrtN6YwzN2gDT1wbx9qDBEfFFJcstiDTjJ6ygNuTPBV/K7SjGfx2YNbcJi5+ygbPOZpDg=="
2626
},
2727
"Microsoft.Web.WebView2": {
2828
"type": "Direct",

Hi3Helper.Core/packages.lock.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"net9.0-windows10.0.26100": {
55
"Microsoft.NET.ILLink.Tasks": {
66
"type": "Direct",
7-
"requested": "[9.0.3, )",
8-
"resolved": "9.0.3",
9-
"contentHash": "1rqGTfubVg0qj2PsK6esyq3PIxtYJYrN3LsYUV9RrvH3anmt3fT3ozYdAZZH4U8JU/pt5pPIUk8NBSu26wtekA=="
7+
"requested": "[9.0.7, )",
8+
"resolved": "9.0.7",
9+
"contentHash": "SZ1brSGoLnhLbE8QUZrtN6YwzN2gDT1wbx9qDBEfFFJcstiDTjJ6ygNuTPBV/K7SjGfx2YNbcJi5+ygbPOZpDg=="
1010
},
1111
"Microsoft.Windows.CsWinRT": {
1212
"type": "Direct",

ImageEx

InnoSetupHelper/packages.lock.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"net9.0": {
55
"Microsoft.NET.ILLink.Tasks": {
66
"type": "Direct",
7-
"requested": "[9.0.3, )",
8-
"resolved": "9.0.3",
9-
"contentHash": "1rqGTfubVg0qj2PsK6esyq3PIxtYJYrN3LsYUV9RrvH3anmt3fT3ozYdAZZH4U8JU/pt5pPIUk8NBSu26wtekA=="
7+
"requested": "[9.0.7, )",
8+
"resolved": "9.0.7",
9+
"contentHash": "SZ1brSGoLnhLbE8QUZrtN6YwzN2gDT1wbx9qDBEfFFJcstiDTjJ6ygNuTPBV/K7SjGfx2YNbcJi5+ygbPOZpDg=="
1010
},
1111
"System.IO.Hashing": {
1212
"type": "Direct",

global.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{
22
"sdk": {
3-
"version": "9.0.202"
3+
"version": "9.0.301",
4+
"rollForward": "latestPatch",
5+
"allowPrerelease": true
46
}
57
}

0 commit comments

Comments
 (0)