Move release script out of public source
This commit is contained in:
31
README.md
31
README.md
@@ -21,12 +21,11 @@ Taskbar Launcher is a small Windows tray launcher for folders, applications, scr
|
||||
TaskbarLauncher/
|
||||
App.xaml
|
||||
MainWindow.xaml
|
||||
Assets/
|
||||
Models/
|
||||
Services/
|
||||
Views/
|
||||
Tools/
|
||||
docs/
|
||||
builds/ generated locally, ignored by Git
|
||||
```
|
||||
|
||||
## Build
|
||||
@@ -37,25 +36,9 @@ Requires the .NET 10 SDK on the developer machine.
|
||||
dotnet build
|
||||
```
|
||||
|
||||
## Release
|
||||
## Download
|
||||
|
||||
Create the small framework-dependent release package:
|
||||
|
||||
```powershell
|
||||
.\Tools\New-TaskbarLauncherRelease.ps1
|
||||
```
|
||||
|
||||
Create a self-contained package that does not require users to install .NET:
|
||||
|
||||
```powershell
|
||||
.\Tools\New-TaskbarLauncherRelease.ps1 -SelfContained
|
||||
```
|
||||
|
||||
Release zips are written to:
|
||||
|
||||
```text
|
||||
builds/releases/
|
||||
```
|
||||
Compiled downloads are published through Gitea Releases when a stable version is ready.
|
||||
|
||||
## Config Files
|
||||
|
||||
@@ -63,16 +46,16 @@ builds/releases/
|
||||
|
||||
`config.example.json` is a public-safe sample config for documentation and reference. New users do not need to copy it; if `config.json` is missing, the app creates a clean starter config on first run.
|
||||
|
||||
Personal test configs should stay in `config.json`; release packages do not include it unless the release script is run with `-IncludeCurrentConfig`.
|
||||
Personal test configs should stay in `config.json`; public release packages do not include private configs.
|
||||
|
||||
## Versioning
|
||||
|
||||
The app version is controlled in `TaskbarLauncher.csproj`.
|
||||
|
||||
Recommended release flow:
|
||||
Recommended release flow for maintainers:
|
||||
|
||||
1. Update `<Version>` in `TaskbarLauncher.csproj`.
|
||||
2. Commit the change.
|
||||
3. Run `.\Tools\New-TaskbarLauncherRelease.ps1`.
|
||||
3. Build a release package locally.
|
||||
4. Tag the release, for example `v1.0.1`.
|
||||
5. Upload the generated zip to Gitea Releases.
|
||||
5. Upload the release zip to Gitea Releases.
|
||||
|
||||
@@ -1,100 +0,0 @@
|
||||
param(
|
||||
[string]$Configuration = "Release",
|
||||
[string]$Runtime = "win-x64",
|
||||
[switch]$IncludeCurrentConfig,
|
||||
[switch]$SelfContained
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$projectDir = Split-Path -Parent $PSScriptRoot
|
||||
$projectPath = Join-Path $projectDir "TaskbarLauncher.csproj"
|
||||
|
||||
[xml]$projectXml = Get-Content -LiteralPath $projectPath
|
||||
$version = $projectXml.Project.PropertyGroup.Version | Select-Object -First 1
|
||||
if ([string]::IsNullOrWhiteSpace($version)) {
|
||||
$version = "0.0.0"
|
||||
}
|
||||
|
||||
$packageKind = if ($SelfContained) { "self-contained" } else { "small" }
|
||||
$releaseRoot = Join-Path $projectDir "builds\releases"
|
||||
$releaseDir = Join-Path $releaseRoot "TaskbarLauncher-v$version-$packageKind"
|
||||
$zipPath = Join-Path $releaseRoot "TaskbarLauncher-v$version-$packageKind.zip"
|
||||
$buildDir = Join-Path $projectDir "builds\intermediate\$packageKind"
|
||||
|
||||
Get-Process TaskbarLauncher -ErrorAction SilentlyContinue | Stop-Process -Force
|
||||
|
||||
if (Test-Path -LiteralPath $releaseDir) {
|
||||
Remove-Item -LiteralPath $releaseDir -Recurse -Force
|
||||
}
|
||||
|
||||
New-Item -ItemType Directory -Path $releaseDir | Out-Null
|
||||
|
||||
dotnet publish $projectPath `
|
||||
-c $Configuration `
|
||||
-r $Runtime `
|
||||
--self-contained:$($SelfContained.IsPresent.ToString().ToLowerInvariant()) `
|
||||
-p:PublishSingleFile=false `
|
||||
-p:DebugType=None `
|
||||
-p:DebugSymbols=false `
|
||||
-p:BaseOutputPath="$buildDir\bin\" `
|
||||
-p:BaseIntermediateOutputPath="$buildDir\obj\" `
|
||||
-o $releaseDir
|
||||
|
||||
Get-ChildItem -LiteralPath $releaseDir -Filter "*.pdb" -ErrorAction SilentlyContinue |
|
||||
Remove-Item -Force
|
||||
|
||||
if ($IncludeCurrentConfig) {
|
||||
$configPath = Join-Path $projectDir "builds\local-self-contained\config.json"
|
||||
if (!(Test-Path -LiteralPath $configPath)) {
|
||||
$configPath = Join-Path (Split-Path -Parent $projectDir) "TaskbarLauncher-editor-publish\config.json"
|
||||
}
|
||||
if (Test-Path -LiteralPath $configPath) {
|
||||
Copy-Item -LiteralPath $configPath -Destination (Join-Path $releaseDir "config.json") -Force
|
||||
}
|
||||
}
|
||||
|
||||
$runtimeNote = if ($SelfContained) {
|
||||
"This package includes the .NET runtime. No separate .NET install is required."
|
||||
} else {
|
||||
"This small package requires Microsoft .NET 10 Desktop Runtime x64."
|
||||
}
|
||||
|
||||
$readme = @"
|
||||
Taskbar Launcher v$version
|
||||
|
||||
Requirements:
|
||||
- Windows x64
|
||||
- $runtimeNote
|
||||
|
||||
.NET 10 Desktop Runtime download:
|
||||
https://dotnet.microsoft.com/en-us/download/dotnet/10.0
|
||||
|
||||
Run:
|
||||
Double-click TaskbarLauncher.exe.
|
||||
|
||||
Notes:
|
||||
- The app stores portable settings in config.json beside TaskbarLauncher.exe.
|
||||
- If config.json is missing, the app creates a clean starter config on first run.
|
||||
- Use Settings > Backup Config before making larger menu changes.
|
||||
"@
|
||||
|
||||
Set-Content -LiteralPath (Join-Path $releaseDir "README.txt") -Value $readme -Encoding UTF8
|
||||
|
||||
if (Test-Path -LiteralPath $zipPath) {
|
||||
Remove-Item -LiteralPath $zipPath -Force
|
||||
}
|
||||
|
||||
Compress-Archive -Path (Join-Path $releaseDir "*") -DestinationPath $zipPath -Force
|
||||
|
||||
$folderSize = (Get-ChildItem -LiteralPath $releaseDir -Recurse | Measure-Object -Property Length -Sum).Sum
|
||||
$zip = Get-Item -LiteralPath $zipPath
|
||||
|
||||
[pscustomobject]@{
|
||||
Version = $version
|
||||
PackageKind = $packageKind
|
||||
ReleaseFolder = $releaseDir
|
||||
ZipPath = $zip.FullName
|
||||
FolderBytes = $folderSize
|
||||
ZipBytes = $zip.Length
|
||||
}
|
||||
@@ -29,31 +29,12 @@ Update version fields in:
|
||||
TaskbarLauncher.csproj
|
||||
```
|
||||
|
||||
## Build Release Zip
|
||||
|
||||
Small package:
|
||||
|
||||
```powershell
|
||||
.\Tools\New-TaskbarLauncherRelease.ps1
|
||||
```
|
||||
|
||||
Self-contained package:
|
||||
|
||||
```powershell
|
||||
.\Tools\New-TaskbarLauncherRelease.ps1 -SelfContained
|
||||
```
|
||||
|
||||
Output:
|
||||
|
||||
```text
|
||||
builds/releases/TaskbarLauncher-vVERSION-small.zip
|
||||
```
|
||||
|
||||
## Publish to Gitea
|
||||
|
||||
1. Commit all source changes.
|
||||
2. Merge `dev` into `main`.
|
||||
3. Tag the release:
|
||||
2. Build the release zip locally.
|
||||
3. Merge `dev` into `main`.
|
||||
4. Tag the release:
|
||||
|
||||
```powershell
|
||||
git tag v1.0.0
|
||||
@@ -61,7 +42,7 @@ git push origin main
|
||||
git push origin v1.0.0
|
||||
```
|
||||
|
||||
4. In Gitea, create a release from the tag.
|
||||
5. Upload the zip from `builds/releases`.
|
||||
5. In Gitea, create a release from the tag.
|
||||
6. Upload the release zip.
|
||||
|
||||
Older releases stay available through Gitea Releases and Git tags.
|
||||
|
||||
Reference in New Issue
Block a user