Skip to content

Commit f702dc5

Browse files
committed
Merge branch 'main' into preview
2 parents 4c2aadc + 36c67d3 commit f702dc5

File tree

205 files changed

+7610
-3766
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

205 files changed

+7610
-3766
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
push:
88
branches:
99
- 'main'
10+
- '1.83.x-staging'
1011
paths-ignore:
1112
- '**.md'
1213
- 'Hi3Helper.Core/Lang/**.json'
@@ -22,8 +23,6 @@ on:
2223
- 'Hi3Helper.Core/Lang/**.json'
2324
- 'Docs/**'
2425
- '**/packages.lock.json'
25-
# schedule:
26-
# - cron: '0 0 * * 0' # At 00:00 on Sunday
2726

2827
env:
2928
DOTNET_INSTALL_DIR: '.\.dotnet'
@@ -33,13 +32,12 @@ env:
3332

3433
jobs:
3534
build:
36-
# runs-on: [self-hosted, linux]
3735
runs-on: windows-latest
3836
strategy:
3937
matrix:
4038
configuration: [Debug] # No need to distribute Debug builds
4139
platform: [x64]
42-
framework: [net9.0-windows10.0.22621.0]
40+
framework: [net9.0-windows10.0.26100.0]
4341

4442
env:
4543
Configuration: ${{ matrix.configuration }}
@@ -79,7 +77,7 @@ jobs:
7977
matrix:
8078
configuration: [Debug]
8179
platform: [x64]
82-
framework: [net9.0-windows10.0.22621.0]
80+
framework: [net9.0-windows10.0.26100.0]
8381

8482
env:
8583
Configuration: ${{ matrix.configuration }}

.github/workflows/qodana-scan-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
matrix:
2525
configuration: [Release] # No need to distribute Debug builds
2626
platform: [x64]
27-
framework: [net9.0-windows10.0.22621.0]
27+
framework: [net9.0-windows10.0.26100.0]
2828
env:
2929
Configuration: ${{ matrix.configuration }}
3030
Platform: ${{ matrix.platform }}

.github/workflows/qodana-scan.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
matrix:
1616
configuration: [Release] # No need to distribute Debug builds
1717
platform: [x64]
18-
framework: [net9.0-windows10.0.22621.0]
18+
framework: [net9.0-windows10.0.26100.0]
1919
env:
2020
Configuration: ${{ matrix.configuration }}
2121
Platform: ${{ matrix.platform }}
@@ -59,7 +59,7 @@ jobs:
5959
# refreshenv
6060
# qodana scan --ide QDNET-EAP -o ${{ runner.temp }}\qodana\results --cache-dir ${{ runner.temp }}\qodana\cache
6161
- name: Qodana Scan
62-
uses: JetBrains/qodana-action@v2024.3.3
62+
uses: JetBrains/qodana-action@main
6363
continue-on-error: true
6464
with:
6565
args: --ide,QDNET

.github/workflows/release-signed.yml

Lines changed: 82 additions & 39 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.2xx'
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,10 +103,26 @@ 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
110127
uses: signpath/[email protected]
111128
with:
@@ -116,33 +133,59 @@ jobs:
116133
github-artifact-id: '${{ steps.upload-unsigned-artifact.outputs.artifact-id }}'
117134
wait-for-completion: true
118135
output-artifact-directory: '/SignedArtifact/'
136+
artifact-configuration-slug: ${{ env.SIGNPATH_ARTIFACT_SLUG}}
119137

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

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]
168+
- name: Final Notify Discord
169+
uses: sarisia/[email protected]
140170
if: always()
141171
continue-on-error: true
142172
with:
143-
webhook: ${{ secrets.DISCORD_WEBHOOK_NIGHTLY }}
144-
title: Collapse Launcher CI build is complete!
173+
webhook: ${{ secrets.DISCORD_WEBHOOK_CIRELEASENOTIFIER }}
174+
title: Collapse Launcher Release CI build is complete!
145175
status: ${{ job.status }}
176+
nofail: true
177+
url: https://github.com/CollapseLauncher/Collapse/actions/runs/${{ github.run_id }}
146178
description: |
147-
Commit `${{ github.sha }}` by ${{ github.actor }}
179+
Commit `${{ github.sha }}` by ${{ github.actor }} in branch `${{ github.ref_name }}`
148180
Click [here](https://nightly.link/CollapseLauncher/Collapse/actions/runs/${{ github.run_id }}) to download!
181+
182+
- name: Install Sentry CLI
183+
uses: MinoruSekine/[email protected]
184+
with:
185+
buckets: extras
186+
apps: sentry-cli
187+
188+
- name: Upload Debug artifact to Sentry
189+
run: |
190+
sentry-cli debug-files upload --org collapse --project collapse-launcher --include-sources '.\SignedArtifact\BuildArtifact-${{ env.VERSION }}'
191+

.idea/.idea.CollapseLauncher/.idea/encodings.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/.idea.CollapseLauncher/.idea/projectSettingsUpdater.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)