Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
shenlebantongying committed Jul 7, 2024
1 parent 5fe4bf5 commit 15db240
Showing 1 changed file with 37 additions and 3 deletions.
40 changes: 37 additions & 3 deletions .github/workflows/release-windows-vcpkg-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,16 +133,50 @@ jobs:
- name: CPack create package
run: |
cd './build_dir'
cpack --verbose --trace
cpack --verbose --trace -G 7Z
cd ..
pwd
- name: Upload packages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
$tag_full = "v$env:version-$env:versionSuffix-$(git rev-parse --short=8 HEAD)"
$tagName = "v$env:version-$env:versionSuffix-$(git rev-parse --short=8 HEAD)"
$changeNotes = "
#### Install instructions for Windows, macOS and Linux
<https://xiaoyifang.github.io/goldendict-ng/install/>.
#### Filename pattern (文件名模式): **[Qt version]-GoldenDict-ng-[OS]-[release-date].[ext]**
Windows users can use either `****-installer.exe` (for installer) or `****.zip` (unzip and run).
The `goldendict.exe` can be dropped into previous installation's folder (if dependencies aren't changed).
Linux users can use Flatpak or build from source.
https://flathub.org/apps/io.github.xiaoyifang.goldendict_ng
macOS users can use `.dmg` installer.
`6.5.1-GoldenDict.exe_windows-2019_20230701.zip` means built with Qt6.5.1, windows/msvc-2019 at 20230701 as a zip archive.
#### Build Details
macOS: macOS-12 (x86_64) and macOS-14 (Arm)
Windows: Visual studio 2019
based on: ${{github.ref_name}}
#### Changes
${{steps.build_changelog.outputs.changelog}}
"
$tagExist = gh api --silent "repos/:owner/:repo/git/refs/tags/${{github.ref_name}}"
if ($tagExist -neq $null){
gh release create ${tagName} --target ${{github.ref_name}} --notes "${changeNotes}"
}
cd './build_dir'
gh release upload "${tag_full}" $(Get-ChildItem -Path '.\*' -Include @("*.7z","*.exe") -Name)
gh release upload "${tagName}" $(Get-ChildItem -Path '.\*' -Include @("*.7z","*.exe") -Name) --target ${{github.ref_name}} --notes "${changeNotes}"
cd ..

0 comments on commit 15db240

Please sign in to comment.