From 37d77a75c030f9e936449c631362729b2481761a Mon Sep 17 00:00:00 2001 From: YZR <2747046473@qq.com> Date: Wed, 25 Dec 2024 11:31:46 +0800 Subject: [PATCH] Add -> winget -> auto update --- .github/workflows/winget | 22 ---------------------- .github/workflows/winget.yml | 13 +++++++++++++ pkg/README.md | 7 ++++++- src/chsrc-main.c | 4 ++-- 4 files changed, 21 insertions(+), 25 deletions(-) delete mode 100644 .github/workflows/winget create mode 100644 .github/workflows/winget.yml diff --git a/.github/workflows/winget b/.github/workflows/winget deleted file mode 100644 index 8415066..0000000 --- a/.github/workflows/winget +++ /dev/null @@ -1,22 +0,0 @@ - - name: WinGet Releaser - # You may pin to the exact commit or the version. - # uses: vedantmgoyal9/winget-releaser@93fd8b606a1672ec3e5c6c3bb19426be68d1a8b0 - uses: vedantmgoyal9/winget-releaser@v2 - with: - # The PackageIdentifier of the package you want to release. - identifier: - # The PackageVersion of the package you want to release. - version: # optional - # The regex to match the installers. - installers-regex: # default is .(exe|msi|msix|appx)(bundle){0,1}$ - # The maximum number of versions to keep in WinGet Community Repository (Default: 0 - no limit) - max-versions-to-keep: # default is 0 - # The repository where the release is present (should be present under same user/organization). - release-repository: # default is ${{ github.event.repository.name }} - # The release tag to be used for creating manifests. - release-tag: # default is ${{ github.event.release.tag_name || github.ref_name }} - # GitHub token to create pull request on Windows Package Manager Community Repository. - token: - # GitHub username where the fork of winget-pkgs is present. - fork-user: # default is ${{ github.repository_owner }} - diff --git a/.github/workflows/winget.yml b/.github/workflows/winget.yml new file mode 100644 index 0000000..fe7472c --- /dev/null +++ b/.github/workflows/winget.yml @@ -0,0 +1,13 @@ +name: Publish to WinGet +on: + release: + types: [released] +jobs: + publish: + runs-on: windows-latest + steps: + - uses: vedantmgoyal9/winget-releaser@main + with: + identifier: RubyMetric.chsrc + installers-regex: '\.exe$' # Only .exe files + token: ${{ secrets.WINGET_TOKEN }} \ No newline at end of file diff --git a/pkg/README.md b/pkg/README.md index 10cbd08..d523b6e 100644 --- a/pkg/README.md +++ b/pkg/README.md @@ -5,6 +5,7 @@ https://github.com/RubyMetric/chsrc/issues/16 - [x] `Homebrew` - [x] `Scoop` - [x] `AUR` +- [x] [Winget - [ ] `Flatpak` - [ ] `snap` - [ ] ... @@ -23,7 +24,7 @@ yay -S chsrc-git # Build from the latest main branch (stable) # Homebrew -https://github.com/Homebrew/homebrew-core/blob/master/Formula/c/chsrc.rb +https://github.com/Homebrew/homebrew-core/blob/master/Formula/c/chsrc.rbRubyMetric.chsrcRubyMetric.chsrc # Scoop @@ -36,3 +37,7 @@ https://github.com/ScoopInstaller/Main/blob/master/bucket/chsrc.json [chsrc](https://aur.archlinux.org/packages/chsrc):从GitHub Release的代码构建 [chsrc-git](https://aur.archlinux.org/packages/chsrc-git):从最新源码构建的版本,偶尔可能不稳定 + +# Winget + +`winget install RubyMetric.chsrc`:直接使用winget命令安装 \ No newline at end of file diff --git a/src/chsrc-main.c b/src/chsrc-main.c index 9c6e5f4..aeb816c 100644 --- a/src/chsrc-main.c +++ b/src/chsrc-main.c @@ -19,9 +19,9 @@ * | czyt * | zouri * | yongxiang <1926885268@qq.com> - * | + * | YU-7 <2747046473@qq.com> * Created On : <2023-08-28> - * Last Modified : <2024-12-18> + * Last Modified : <2024-12-25> * * chsrc: Change Source —— 全平台通用命令行换源工具 * ------------------------------------------------------------*/