forked from ClassIsland/ClassIsland
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
412 changed files
with
17,590 additions
and
2,314 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
.github/DISCUSSION_TEMPLATE/%E7%BB%84%E4%BB%B6%E9%85%8D%E7%BD%AE%E5%88%86%E4%BA%AB.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
title: "【组件配置】(将这段话【替换】你的标题,删掉括号)" | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
欢迎您分享组件配置!请在上面的文本框⬆️起一个能够清晰地概括您的组件配置特性,能吸引其他用户使用您的配置的标题。 | ||
- type: textarea | ||
id: config | ||
attributes: | ||
label: 配置文件 | ||
description: 将组件配置文件(*.json)上传到这个输入框中。 | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: description | ||
attributes: | ||
label: 配置介绍 | ||
description: 介绍一下您的配置 | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: screenshots | ||
attributes: | ||
label: 截图 | ||
description: 在这里附上您的组件配置的截图。 | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: requirements | ||
attributes: | ||
label: 配置需求 | ||
description: 使用此配置文件的前置要求,如最低应用版本、需要安装的插件等。 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,26 +2,47 @@ name: Build | |
|
||
on: | ||
push: | ||
workflow_dispatch: | ||
inputs: | ||
release_tag: | ||
description: '发布标签' | ||
required: true | ||
type: string | ||
primary_version: | ||
description: '主发布版本' | ||
required: true | ||
type: string | ||
channels: | ||
description: '发布通道' | ||
required: true | ||
type: string | ||
is_test_mode: | ||
description: '是否处于测试发布模式' | ||
required: false | ||
type: boolean | ||
|
||
jobs: | ||
build_app: | ||
runs-on: windows-latest # For a list of available runner types, refer to | ||
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on | ||
env: | ||
Solution_Name: ClassIsland.sln # Replace with your solution name, i.e. MyWpfApp.sln. | ||
# Test_Project_Path: your-test-project-path # Replace with the path to your test project, i.e. MyWpfApp.Tests\MyWpfApp.Tests.csproj. | ||
Wap_Project_Directory: ClassIsland/ClassIsland # Replace with the Wap project directory relative to the solution, i.e. MyWpfApp.Package. | ||
Wap_Project_Path: ClassIsland/ClassIsland/ClassIsland.csproj # Replace with the path to your Wap project, i.e. MyWpf.App.Package\MyWpfApp.Package.wapproj. | ||
artifact_name: out_app_windows_x64_${{ matrix.trim_assets == 'true' && 'trimmed' || 'full' }}_${{ matrix.package }} | ||
isTestMode: ${{ github.event.inputs.is_test_mode }} | ||
strategy: | ||
matrix: | ||
trim_assets: [true, false] | ||
name: Build (AssetsTrimmed ${{ matrix.trim_assets }}) | ||
matrix: | ||
trim_assets: ['true', 'false'] | ||
package: ['singleFile'] | ||
exclude: | ||
- package: wap | ||
trim_assets: 'true' | ||
name: Build_windows_x64_${{ matrix.trim_assets == 'true' && 'trimmed' || 'full' }}_${{ matrix.package }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
submodules: recursive | ||
ref: ${{ github.event_name != 'workflow_dispatch' && github.ref || github.event.inputs.release_tag }} | ||
|
||
- name: List files | ||
run: ls | ||
|
@@ -39,15 +60,27 @@ jobs: | |
- name: Build application | ||
env: | ||
trim_assets: ${{ matrix.trim_assets }} | ||
package: ${{ matrix.package }} | ||
is_release: ${{ startsWith(github.ref, 'refs/tags/') }} | ||
test_signing_key: ${{ secrets.TEST_SIGNING_KEY }} | ||
run: | | ||
ls | ||
pwsh -ep Bypass -c ./tools/publish.ps1 $env:trim_assets | ||
- name: Upload APP to artifacts | ||
if ($env:package -eq "wap") { | ||
# WAP | ||
pwsh -ep Bypass -c ./tools/release-gen/publish-wap.ps1 false $env:is_release | ||
} else { | ||
# Single File | ||
pwsh -ep Bypass -c ./tools/release-gen/publish.ps1 $env:trim_assets | ||
} | ||
- name: Upload Unsigned APP to artifacts | ||
id: upload-unsigned-artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: out_app_assetsTrimmed_${{ matrix.trim_assets }} | ||
path: ./out/*.zip | ||
name: ${{ env.artifact_name }} | ||
path: | | ||
./out/*.zip | ||
./out/*.appx | ||
build_nupkg: | ||
runs-on: windows-latest # For a list of available runner types, refer to | ||
|
@@ -64,6 +97,7 @@ jobs: | |
with: | ||
fetch-depth: 0 | ||
submodules: recursive | ||
ref: ${{ github.event_name != 'workflow_dispatch' && github.ref || github.event.inputs.release_tag }} | ||
|
||
- name: List files | ||
run: ls | ||
|
@@ -83,7 +117,7 @@ jobs: | |
is_release: ${{ startsWith(github.ref, 'refs/tags/') }} | ||
run: | | ||
ls | ||
pwsh -ep Bypass -c ./tools/publish-nupkg.ps1 $env:is_release | ||
pwsh -ep Bypass -c ./tools/release-gen/publish-nupkg.ps1 $env:is_release | ||
# - name: Upload Nuget packages to GitHub registry | ||
# if: ${{ github.event_name != 'pull_request' }} | ||
|
@@ -99,25 +133,50 @@ jobs: | |
with: | ||
name: out_nupkgs | ||
path: ./out/*.nupkg | ||
|
||
publish: | ||
runs-on: windows-latest | ||
if: ${{ startsWith(github.ref, 'refs/tags/') }} | ||
needs: [build_app, build_nupkg] | ||
env: | ||
isTestMode: ${{ github.event.inputs.is_test_mode == true }} | ||
if: ${{ github.event.inputs.release_tag && github.event_name != 'pull_request' }} | ||
needs: [ build_app, build_nupkg ] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
submodules: recursive | ||
ref: ${{ github.event_name != 'workflow_dispatch' && github.ref || github.event.inputs.release_tag }} | ||
|
||
- name: Get commit hash | ||
uses: prompt/actions-commit-hash@v3 | ||
id: commit | ||
with: | ||
prefix: "${{ github.event.inputs.release_tag }}+" | ||
|
||
- name: Download artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
path: ./out_artifacts | ||
|
||
- name: Pre publish | ||
- name: Install SSH key | ||
uses: shimataro/ssh-key-action@v2 | ||
with: | ||
key: ${{ secrets.METADATA_DEPLOY_KEY }} | ||
known_hosts: ${{ secrets.SSH_KNOWN_HOSTS }} | ||
|
||
- name: Upload APP | ||
env: | ||
GHAPP_PRIVATE_KEY: ${{ secrets.GHAPP_PRIVATE_KEY }} | ||
GHAPP_ID: 998668 | ||
GHAPP_INSTALLATION_ID: 54893567 | ||
ALIST_HOST: ${{ secrets.ALIST_HOST }} | ||
ALIST_KEY: ${{ secrets.ALIST_KEY }} | ||
primaryVersion: ${{ github.event.inputs.primary_version }} | ||
channels: ${{ github.event.inputs.channels }} | ||
run: | | ||
pwsh -ep Bypass -c ./tools/pre-publish.ps1 | ||
pwsh -ep Bypass -c ./tools/release-gen/login-github.ps1 | ||
pwsh -ep Bypass -c ./tools/release-gen/upload.ps1 | ||
# - name: Sentry Release | ||
# uses: getsentry/[email protected] | ||
|
@@ -132,26 +191,27 @@ jobs: | |
- name: Upload APP to release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
artifacts: ./out/ClassIsland.zip,./out/*.zip | ||
artifacts: "./out/*.zip,./out/*.appx" | ||
draft: true | ||
bodyFile: ./out/checksums.md | ||
bodyFile: ./out/ChangeLogs.md | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# - name: Upload Nuget packages to NuGet Gallery | ||
# if: ${{ github.event_name != 'pull_request' }} | ||
# env: | ||
# NUGET_KEY: ${{ secrets.NUGET_KEY }} | ||
# run: | | ||
# ls | ||
# cd out | ||
# dotnet nuget push *.nupkg -k $env:NUGET_KEY -s https://api.nuget.org/v3/index.json --skip-duplicate | ||
tag: ${{ github.event_name != 'workflow_dispatch' && github.ref || github.event.inputs.release_tag }} | ||
- name: Upload Nuget packages to NuGet Gallery | ||
if: ${{ github.event_name != 'pull_request' }} | ||
env: | ||
NUGET_KEY: ${{ secrets.NUGET_KEY }} | ||
run: | | ||
ls | ||
cd out | ||
dotnet nuget push *.nupkg -k $env:NUGET_KEY -s https://api.nuget.org/v3/index.json --skip-duplicate | ||
# - name: Upload to AppCenter | ||
# env: | ||
# APPCENTER_TOKEN: ${{ secrets.APPCENTER_TOKEN }} | ||
# run: | | ||
# $env:app_ver = (git describe --abbrev=0 --tags) | ||
# Write-Host "Uploading to AppCenter..." -ForegroundColor Cyan | ||
# pwsh -ep Bypass -c .\tools\pre-appcenter-upload.ps1 | ||
# pwsh -ep Bypass -c .\tools\appcenter-upload.ps1 $env:APPCENTER_TOKEN $env:app_ver | ||
- name: Upload to AppCenter | ||
env: | ||
APPCENTER_TOKEN: ${{ secrets.APPCENTER_TOKEN }} | ||
run: | | ||
$env:app_ver = (git describe --abbrev=0 --tags) | ||
Write-Host "Uploading to AppCenter..." -ForegroundColor Cyan | ||
pwsh -ep Bypass -c .\tools\release-gen\pre-appcenter-upload.ps1 | ||
pwsh -ep Bypass -c .\tools\release-gen\appcenter-upload.ps1 $env:APPCENTER_TOKEN $env:app_ver | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -360,4 +360,6 @@ MigrationBackup/ | |
.ionide/ | ||
|
||
# Fody - auto-generated XML schema | ||
FodyWeavers.xsd | ||
FodyWeavers.xsd | ||
|
||
ci_tmp/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
using System.Reflection; | ||
using System.Runtime.Versioning; | ||
|
||
[assembly: AssemblyVersion(ThisAssembly.Git.BaseTag)] | ||
[assembly: AssemblyInformationalVersion($"{ThisAssembly.Git.BaseTag}+{ThisAssembly.Git.Sha}")] | ||
[assembly: AssemblyTitle("ClassIsland")] | ||
[assembly: AssemblyProduct("ClassIsland")] | ||
#if NETCOREAPP | ||
[assembly: SupportedOSPlatform("Windows")] | ||
#endif |
Oops, something went wrong.