Skip to content

Commit a0788f1

Browse files
author
LouisDing
committed
Finish Release-v0.0.0
2 parents 709b5f6 + bcddbbc commit a0788f1

19 files changed

Lines changed: 806 additions & 49 deletions

.github/workflows/cd.yml

Lines changed: 96 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,18 @@ name: CD — Release Build & Publish
33
on:
44
push:
55
tags:
6-
- "Release-*" # 只有符合 Release-x.y.z 的 tag 才觸發
6+
- "Release-*"
77

88
jobs:
99
build-installer:
10-
name: Build Installer & Publish Release
10+
name: Build Installer & Publish Public Release
1111
runs-on: windows-latest
1212

1313
permissions:
14-
contents: write # 允許建立 GitHub Release 並上傳 assets
14+
contents: read
15+
16+
env:
17+
RELEASE_REPOSITORY: JJDing-Louis/YTDownloader-Release
1518

1619
steps:
1720
# ── 1. 取出版本號(去掉 "Release-" 前綴)──────────────────────────────
@@ -27,6 +30,18 @@ jobs:
2730
# ── 2. Checkout ──────────────────────────────────────────────────────────
2831
- name: Checkout source
2932
uses: actions/checkout@v4
33+
with:
34+
fetch-depth: 0
35+
36+
- name: Verify public release token
37+
shell: pwsh
38+
env:
39+
RELEASE_REPO_TOKEN: ${{ secrets.RELEASE_REPO_TOKEN }}
40+
run: |
41+
if ([string]::IsNullOrWhiteSpace($env:RELEASE_REPO_TOKEN)) {
42+
Write-Error "Missing repository secret RELEASE_REPO_TOKEN. Create a fine-grained token that can write releases to $env:RELEASE_REPOSITORY."
43+
exit 1
44+
}
3045
3146
# ── 3. 設定 .NET 8 ───────────────────────────────────────────────────────
3247
- name: Setup .NET 8
@@ -45,7 +60,10 @@ jobs:
4560
--runtime win-x64
4661
--self-contained true
4762
-p:PublishSingleFile=false
48-
-p:AppVersion=${{ steps.version.outputs.VERSION }}
63+
-p:Version=${{ steps.version.outputs.VERSION }}
64+
-p:AssemblyVersion=${{ steps.version.outputs.VERSION }}.0
65+
-p:FileVersion=${{ steps.version.outputs.VERSION }}.0
66+
-p:InformationalVersion=${{ steps.version.outputs.VERSION }}
4967
--output publish
5068
5169
# ── 5. 安裝 Inno Setup 6 ─────────────────────────────────────────────────
@@ -70,23 +88,83 @@ jobs:
7088
if (-not $files) { Write-Error "No installer found!"; exit 1 }
7189
$files | ForEach-Object { Write-Host "Found: $($_.FullName)" }
7290
73-
# ── 8. 建立 GitHub Release 並上傳安裝程式 ───────────────────────────────
74-
- name: Create GitHub Release
91+
# ── 8. 產生 SHA256 檔案雜湊 ───────────────────────────────────────────
92+
- name: Generate SHA256 checksums
93+
shell: pwsh
94+
run: |
95+
./scripts/New-FileHashes.ps1 `
96+
-Path installer/Output `
97+
-OutputFile installer/Output/SHA256SUMS.txt `
98+
-Filter "*.exe"
99+
Get-Content installer/Output/SHA256SUMS.txt
100+
101+
# ── 9. 從上一個 Release tag 產生 changelog ───────────────────────────
102+
- name: Generate release notes
103+
id: release_notes
104+
shell: pwsh
105+
run: |
106+
$version = "${{ steps.version.outputs.VERSION }}"
107+
$currentTag = "${{ github.ref_name }}"
108+
$tags = git tag --list "Release-*" --sort=-v:refname
109+
$previousTag = $tags | Where-Object { $_ -ne $currentTag } | Select-Object -First 1
110+
111+
if ($previousTag) {
112+
$range = "$previousTag..$currentTag"
113+
$compareText = "Changes since $previousTag"
114+
$commits = git log --pretty=format:"- %s (%h)" $range
115+
} else {
116+
$compareText = "Initial release"
117+
$commits = git log --pretty=format:"- %s (%h)" $currentTag
118+
}
119+
120+
if (-not $commits) {
121+
$commits = "- No commit changes detected."
122+
}
123+
124+
$commitText = ($commits -join "`n")
125+
$notes = @(
126+
"## YTDownloader v$version",
127+
"",
128+
"### Installation",
129+
"",
130+
"1. Download ``YTDownloader_Setup_v$version.exe``.",
131+
"2. Verify the installer with ``SHA256SUMS.txt`` if needed.",
132+
"3. Run the installer and follow the setup wizard.",
133+
"",
134+
"### System Requirements",
135+
"",
136+
"- Windows 10 version 1809 or later",
137+
"- x64 architecture",
138+
"",
139+
"### Changelog",
140+
"",
141+
$compareText,
142+
"",
143+
$commitText,
144+
"",
145+
"### File Hashes",
146+
"",
147+
"See ``SHA256SUMS.txt`` attached to this release.",
148+
"",
149+
"### License",
150+
"",
151+
"YTDownloader is distributed under the YTDownloader End User License Agreement. Users may install and use the official application for personal, learning, backup, and other non-commercial purposes. Commercial use, redistribution, product bundling, paid packaging, and commercial service use are not permitted."
152+
)
153+
154+
$notes | Set-Content -Path RELEASE_NOTES.md -Encoding utf8
155+
Get-Content RELEASE_NOTES.md
156+
157+
# ── 10. 建立 public release repo 的 GitHub Release 並上傳安裝程式與雜湊檔 ─
158+
- name: Create public GitHub Release
75159
uses: softprops/action-gh-release@v2
76160
with:
161+
repository: ${{ env.RELEASE_REPOSITORY }}
77162
tag_name: ${{ github.ref_name }}
78163
name: "YTDownloader ${{ steps.version.outputs.VERSION }}"
79-
body: |
80-
## YTDownloader v${{ steps.version.outputs.VERSION }}
81-
82-
### 安裝方式
83-
1. 下載下方的 `YTDownloader_Setup_v${{ steps.version.outputs.VERSION }}.exe`
84-
2. 執行安裝程式,依照指示完成安裝
85-
3. 啟動 YTDownloader
86-
87-
### 系統需求
88-
- Windows 10 (1809) 以上
89-
- x64 架構
90-
files: installer/Output/YTDownloader_Setup_v${{ steps.version.outputs.VERSION }}.exe
164+
body_path: RELEASE_NOTES.md
165+
files: |
166+
installer/Output/YTDownloader_Setup_v${{ steps.version.outputs.VERSION }}.exe
167+
installer/Output/SHA256SUMS.txt
91168
draft: false
92169
prerelease: false
170+
token: ${{ secrets.RELEASE_REPO_TOKEN }}

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,4 +665,8 @@ fabric.properties
665665
/publish/
666666

667667
# Inno Setup 輸出安裝檔
668-
/installer/Output/
668+
/installer/Output/
669+
670+
# Local AI assistant instructions
671+
/AGENTS.md
672+
/CLAUDE.md

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Changelog
2+
3+
Release notes are generated automatically by the GitHub Actions CD workflow when a `Release-*` tag is pushed.
4+
5+
Manual changelog entries can be added here when a release needs extra context that is not obvious from commit history.
6+
7+
## Unreleased
8+
9+
- Replaced MIT License with the YTDownloader End User License Agreement for private-source, non-commercial application distribution.
10+
- Added user guide, privacy notice, release process documentation, automated release notes, and SHA256 hash generation.

LICENSE

Lines changed: 0 additions & 21 deletions
This file was deleted.

LICENSE.md

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
YTDownloader End User License Agreement
2+
Version 1.0
3+
4+
Copyright (c) 2026 J.J.Ding
5+
All rights reserved except as expressly granted below.
6+
7+
This license applies to the official YTDownloader application, installer,
8+
documentation, assets, and project materials owned by J.J.Ding.
9+
10+
The YTDownloader source repository is private. No license is granted to access,
11+
copy, modify, distribute, publish, mirror, package, or reuse the source code
12+
unless J.J.Ding gives express written permission.
13+
14+
1. Permitted Use
15+
16+
You may install and use the official YTDownloader application for personal,
17+
learning, backup, and other non-commercial purposes.
18+
19+
2. Application Function and Purpose
20+
21+
YTDownloader is intended to help users download YouTube video or audio media and
22+
manage download tasks and download history.
23+
24+
YTDownloader is a user-operated download helper. It does not provide, host,
25+
sell, license, or grant rights to any YouTube video, audio, subtitle, thumbnail,
26+
metadata, or other media content.
27+
28+
3. Restrictions
29+
30+
You may not:
31+
32+
- use YTDownloader for any commercial purpose;
33+
- sell, rent, license, sublicense, monetize, or otherwise commercially exploit
34+
YTDownloader;
35+
- redistribute, publish, mirror, upload, share, or make available copies of
36+
YTDownloader, its installer, binaries, source code, or modified versions;
37+
- bundle, embed, integrate, package, or include YTDownloader, in whole or in
38+
part, in another product, service, application, installer, marketplace
39+
listing, package manager, or commercial workflow;
40+
- operate YTDownloader as part of a hosted, managed, paid, advertising-supported,
41+
subscription-based, or client-facing service;
42+
- use YTDownloader for unauthorized commercial distribution, resale, public
43+
playback, public transmission, or any activity that infringes the rights of
44+
content owners or other third parties;
45+
- remove or alter copyright, license, privacy, legal, or attribution notices;
46+
- reverse engineer, decompile, disassemble, or attempt to derive source code
47+
from YTDownloader except to the extent such restriction is prohibited by
48+
applicable law.
49+
50+
4. Official Distribution
51+
52+
Only J.J.Ding may publish official YTDownloader releases unless written
53+
permission is granted by J.J.Ding.
54+
55+
Receiving an official installer or binary does not give you permission to
56+
redistribute it. Users should obtain YTDownloader only from an official channel
57+
designated by J.J.Ding.
58+
59+
5. No Commercial License
60+
61+
No commercial license is offered. Commercial use, resale, paid redistribution,
62+
product bundling, and commercial service use are prohibited.
63+
64+
6. Media and Platform Rights
65+
66+
Content downloaded from YouTube or other platforms may be protected by
67+
copyright, platform terms of service, license terms, or third-party rights.
68+
69+
YTDownloader does not grant any copyright, reproduction right, distribution
70+
right, public performance right, public transmission right, or commercial use
71+
right for downloaded media.
72+
73+
You are responsible for confirming that your downloading, storage, sharing, and
74+
use of media complies with applicable law, platform terms, and permissions from
75+
the original rights holders.
76+
77+
7. Third-Party Components
78+
79+
Third-party tools, binaries, packages, and dependencies bundled with or used by
80+
YTDownloader remain governed by their own licenses. This license applies only to
81+
YTDownloader code and assets owned by J.J.Ding.
82+
83+
8. No Warranty
84+
85+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
86+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
87+
FOR A PARTICULAR PURPOSE, TITLE, AND NONINFRINGEMENT.
88+
89+
9. Limitation of Liability
90+
91+
IN NO EVENT SHALL J.J.DING BE LIABLE FOR ANY CLAIM, DAMAGES, LEGAL DISPUTE,
92+
COPYRIGHT CLAIM, PLATFORM ACCOUNT ISSUE, DATA LOSS, BUSINESS LOSS, OR OTHER
93+
LIABILITY ARISING FROM OR RELATED TO YTDOWNLOADER, DOWNLOADED MEDIA, OR USE OF
94+
THE SOFTWARE.
95+
96+
10. Termination
97+
98+
Your rights under this license terminate automatically if you violate any term
99+
of this license. After termination, you must stop using YTDownloader and delete
100+
all copies in your possession or control, except where retention is legally
101+
required.

PRIVACY.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Privacy Notice
2+
3+
Effective date: 2026-05-03
4+
5+
YTDownloader is a Windows desktop application. It is designed to run locally on the user's computer.
6+
7+
## Data Processed Locally
8+
9+
YTDownloader may store or process the following data on your device:
10+
11+
- application settings, such as download folder, appearance, language, and concurrency options;
12+
- download history, including URLs, file names, media type, status, and timestamps;
13+
- logs used for troubleshooting;
14+
- temporary files produced while downloading or converting media.
15+
16+
## Network Requests
17+
18+
YTDownloader sends network requests needed to inspect and download media from URLs you provide. These requests may be handled by bundled or integrated tools such as `yt-dlp` and `ffmpeg`.
19+
20+
YTDownloader does not operate a server controlled by the developer for collecting user data.
21+
22+
## No Account System
23+
24+
YTDownloader does not require an account, login, subscription, or cloud profile.
25+
26+
## No Analytics
27+
28+
YTDownloader does not intentionally include telemetry, analytics, tracking pixels, advertising identifiers, or behavior tracking.
29+
30+
## Third-Party Services
31+
32+
When you download media from a website or platform, that platform may receive your request, IP address, cookies, account state, or other information according to its own systems and policies. YTDownloader does not control those third-party services.
33+
34+
## User Responsibility
35+
36+
You are responsible for the URLs you enter and the media you download. Make sure your use complies with applicable law, platform terms, and rights-holder permissions.
37+
38+
## Data Removal
39+
40+
You can remove local data by:
41+
42+
- clearing download history from the settings screen;
43+
- deleting downloaded files from your chosen download folder;
44+
- deleting logs and temporary files from the application folder or configured storage locations;
45+
- uninstalling the application.
46+
47+
## Contact
48+
49+
For privacy or security questions, open an issue in the public release repository:
50+
51+
https://github.com/JJDing-Louis/YTDownloader-Release/issues

README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# YTDownloader
2+
3+
YTDownloader is a Windows desktop application for downloading video, audio, and playlist content through a native WinForms interface.
4+
5+
## Download
6+
7+
Official installers are published through the public binary-only release channel:
8+
9+
https://github.com/JJDing-Louis/YTDownloader-Release/releases
10+
11+
Each release includes:
12+
13+
- `YTDownloader_Setup_v<version>.exe`
14+
- `SHA256SUMS.txt`
15+
- generated release notes from the commit history
16+
17+
## System Requirements
18+
19+
- Windows 10 version 1809 or later
20+
- x64 processor
21+
- Internet access for downloading media and metadata
22+
23+
Release builds are published as self-contained `win-x64` builds, so a separate .NET Desktop Runtime installation should not be required.
24+
25+
## Documentation
26+
27+
- [User Guide](docs/USER_GUIDE.md)
28+
- [Release Process](docs/RELEASE.md)
29+
- [Changelog](CHANGELOG.md)
30+
- [Privacy Notice](PRIVACY.md)
31+
- [License](LICENSE.md)
32+
33+
## Development
34+
35+
```powershell
36+
dotnet restore YTDownloader.sln
37+
dotnet build YTDownloader.sln -c Release
38+
dotnet test YTDownloaderTest/YTDownloaderTest.csproj -c Release
39+
```
40+
41+
## License
42+
43+
YTDownloader is distributed under the [YTDownloader End User License Agreement](LICENSE.md). You may install and use the official application for personal, learning, backup, and other non-commercial purposes. Commercial use, redistribution, product bundling, paid packaging, and commercial service use are not permitted. No commercial license is offered.
44+
45+
The source repository is private. No source-code license is granted unless J.J.Ding gives express written permission.

0 commit comments

Comments
 (0)