Skip to content

Commit ae5d586

Browse files
committed
Fix windows velopack package creation in GHA
1 parent 3725517 commit ae5d586

5 files changed

Lines changed: 156 additions & 106 deletions

File tree

.github/workflows/build.yaml

Lines changed: 142 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
- name: Setup python
5757
uses: actions/setup-python@v6
5858
with:
59-
python-version: "3.13"
59+
python-version: "3.14"
6060

6161
- name: Determine source branch
6262
id: which-branch
@@ -160,10 +160,13 @@ jobs:
160160
# Windows Velopack outputs (passed to sign-pkg-windows)
161161
velopack_pack_id: ${{ steps.build.outputs.velopack_pack_id }}
162162
velopack_pack_version: ${{ steps.build.outputs.velopack_pack_version }}
163+
velopack_pack_authors: ${{ steps.build.outputs.velopack_pack_authors }}
163164
velopack_pack_title: ${{ steps.build.outputs.velopack_pack_title }}
164165
velopack_main_exe: ${{ steps.build.outputs.velopack_main_exe }}
165166
velopack_exclude: ${{ steps.build.outputs.velopack_exclude }}
166167
velopack_icon: ${{ steps.build.outputs.velopack_icon }}
168+
velopack_splash: ${{ steps.build.outputs.velopack_splash }}
169+
velopack_splash_color: ${{ steps.build.outputs.velopack_splash_color }}
167170
velopack_installer_base: ${{ steps.build.outputs.velopack_installer_base }}
168171
# macOS Velopack outputs (passed to sign-pkg-mac)
169172
velopack_mac_pack_id: ${{ steps.build.outputs.velopack_mac_pack_id }}
@@ -254,14 +257,6 @@ jobs:
254257
- name: Install python dependencies
255258
run: pip3 install llsd cmake ninja
256259

257-
- name: Setup .NET for Velopack
258-
uses: actions/setup-dotnet@v5
259-
with:
260-
dotnet-version: '10.x'
261-
262-
- name: Install Velopack CLI
263-
run: dotnet tool restore
264-
265260
- name: Bootstrap vcpkg Windows
266261
if: runner.os == 'Windows'
267262
run: |
@@ -472,34 +467,109 @@ jobs:
472467
# ${{ steps.configure.outputs.build_directory }}/llappearanceutility/Release/appearance-utility-bin
473468
# ${{ steps.configure.outputs.build_directory }}/llappearanceutility/Release/appearance-utility-headless-bin
474469

475-
# sign-and-package-windows:
476-
# env:
477-
# AZURE_KEY_VAULT_URI: ${{ secrets.AZURE_KEY_VAULT_URI }}
478-
# AZURE_CERT_NAME: ${{ secrets.AZURE_CERT_NAME }}
479-
# AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
480-
# AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
481-
# AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
482-
# needs: [setup, build]
483-
# runs-on: windows-2022
484-
# if: needs.setup.outputs.build_type == 'proprietary'
485-
# steps:
486-
# - name: Sign and package Windows viewer
487-
# if: env.AZURE_KEY_VAULT_URI && env.AZURE_CERT_NAME && env.AZURE_CLIENT_ID && env.AZURE_CLIENT_SECRET && env.AZURE_TENANT_ID
488-
# uses: secondlife/viewer-build-util/sign-pkg-windows@geenz/velopack
489-
# with:
490-
# vault_uri: "${{ env.AZURE_KEY_VAULT_URI }}"
491-
# cert_name: "${{ env.AZURE_CERT_NAME }}"
492-
# client_id: "${{ env.AZURE_CLIENT_ID }}"
493-
# client_secret: "${{ env.AZURE_CLIENT_SECRET }}"
494-
# tenant_id: "${{ env.AZURE_TENANT_ID }}"
495-
# installer_type: "${{ github.event.inputs.installer_type || 'velopack' }}"
496-
# velopack_pack_id: "${{ needs.build.outputs.velopack_pack_id }}"
497-
# velopack_pack_version: "${{ needs.build.outputs.velopack_pack_version }}"
498-
# velopack_pack_title: "${{ needs.build.outputs.velopack_pack_title }}"
499-
# velopack_main_exe: "${{ needs.build.outputs.velopack_main_exe }}"
500-
# velopack_exclude: "${{ needs.build.outputs.velopack_exclude }}"
501-
# velopack_icon: "${{ needs.build.outputs.velopack_icon }}"
502-
# velopack_installer_base: "${{ needs.build.outputs.velopack_installer_base }}"
470+
sign-and-package-windows:
471+
needs: [setup, build]
472+
runs-on: windows-2025
473+
if: needs.setup.outputs.build_type == 'proprietary'
474+
steps:
475+
- name: Checkout code
476+
uses: actions/checkout@v7
477+
with:
478+
submodules: recursive
479+
ref: ${{ github.event.pull_request.head.sha || github.sha }}
480+
481+
- name: Setup .NET for Velopack
482+
uses: actions/setup-dotnet@v5
483+
with:
484+
dotnet-version: '10.x'
485+
486+
- name: Install Velopack CLI
487+
run: dotnet tool restore
488+
489+
- name: Fetch Windows app
490+
uses: actions/download-artifact@v8
491+
with:
492+
name: Windows-x64-app
493+
path: .app
494+
495+
- name: Build and sign Velopack package
496+
shell: bash
497+
env:
498+
PACK_ID: ${{ needs.build.outputs.velopack_pack_id }}
499+
PACK_VERSION: ${{ needs.build.outputs.velopack_pack_version }}
500+
PACK_TITLE: ${{ needs.build.outputs.velopack_pack_title }}
501+
PACK_AUTHORS: ${{ needs.build.outputs.velopack_pack_authors }}
502+
MAIN_EXE: ${{ needs.build.outputs.velopack_main_exe }}
503+
EXCLUDE: ${{ needs.build.outputs.velopack_exclude }}
504+
ICON: ${{ needs.build.outputs.velopack_icon }}
505+
SPLASH_IMAGE: ${{ needs.build.outputs.velopack_splash }}
506+
SPLASH_COLOR: ${{ needs.build.outputs.velopack_splash_color }}
507+
INSTALLER_BASE: ${{ needs.build.outputs.velopack_installer_base }}
508+
run: |
509+
set -x
510+
511+
vpk_args=(
512+
vpk pack
513+
--packId "$PACK_ID"
514+
--packVersion "$PACK_VERSION"
515+
--packAuthors "$PACK_AUTHORS"
516+
--packDir .app
517+
--mainExe "$MAIN_EXE"
518+
--packTitle "$PACK_TITLE"
519+
--exclude "$EXCLUDE"
520+
--shortcuts ''
521+
--splashProgressColor "$SPLASH_COLOR"
522+
)
523+
524+
# Add icon if provided
525+
if [[ -n "$ICON" && -f ".app/$ICON" ]]; then
526+
vpk_args+=(--icon ".app/$ICON")
527+
fi
528+
529+
# Add splash if provided
530+
if [[ -n "$SPLASH_IMAGE" && -f ".app/$SPLASH_IMAGE" ]]; then
531+
vpk_args+=(--splashImage ".app/$SPLASH_IMAGE")
532+
fi
533+
534+
"${vpk_args[@]}"
535+
536+
- name: Rename Velopack outputs
537+
shell: bash
538+
env:
539+
PACK_ID: ${{ needs.build.outputs.velopack_pack_id }}
540+
INSTALLER_BASE: ${{ needs.build.outputs.velopack_installer_base }}
541+
run: |
542+
# Move Setup.exe into .app for the installer upload step
543+
setup="Releases/${PACK_ID}-win-Setup.exe"
544+
if [[ -f "$setup" ]]; then
545+
mv "$setup" ".app/${INSTALLER_BASE}_Setup.exe"
546+
echo "Moved $setup to .app/${INSTALLER_BASE}_Setup.exe"
547+
fi
548+
549+
# Rename Portable.zip to include version
550+
portable="Releases/${PACK_ID}-win-Portable.zip"
551+
if [[ -f "$portable" ]]; then
552+
mv "$portable" "Releases/${INSTALLER_BASE}_Portable.zip"
553+
echo "Moved $portable to Releases/${INSTALLER_BASE}_Portable.zip"
554+
fi
555+
556+
- name: Find Velopack installer
557+
shell: bash
558+
run: |
559+
installer="$(ls -t .app/*_Setup.exe | head -n 1)"
560+
echo "installer=$installer" >> "$GITHUB_ENV"
561+
562+
- name: Post the installer
563+
uses: actions/upload-artifact@v7
564+
with:
565+
name: "Windows-installer"
566+
path: ${{ env.installer }}
567+
568+
- name: Upload Velopack releases
569+
uses: actions/upload-artifact@v7
570+
with:
571+
name: "Windows-releases"
572+
path: Releases/
503573

504574
# sign-and-package-mac:
505575
# env:
@@ -610,60 +680,41 @@ jobs:
610680
# node-version: "22"
611681
# dumpSyms: false
612682

613-
# release:
614-
# needs: [setup, build, sign-and-package-windows, sign-and-package-mac]
615-
# runs-on: ubuntu-latest
616-
# if: needs.setup.outputs.release_run
617-
# steps:
618-
# # - uses: actions/download-artifact@v8
619-
# # with:
620-
# # pattern: "*-installer"
621-
622-
# - uses: actions/download-artifact@v8
623-
# with:
624-
# pattern: "*-metadata"
683+
release:
684+
needs: [setup, build, sign-and-package-windows]
685+
runs-on: ubuntu-latest
686+
if: needs.setup.outputs.release_run
687+
steps:
688+
- uses: actions/download-artifact@v8
689+
with:
690+
pattern: "*-installer"
625691

626-
# - uses: actions/download-artifact@v8
627-
# with:
628-
# pattern: "*-releases"
692+
- uses: actions/download-artifact@v8
693+
with:
694+
pattern: "*-releases"
629695

630-
# - uses: actions/download-artifact@v8
631-
# with:
632-
# name: "Linux-app"
696+
- uses: actions/download-artifact@v8
697+
with:
698+
name: "Linux-x64-app"
633699

634-
# - name: Rename metadata
635-
# run: |
636-
# cp Windows-metadata/newview/viewer_version.txt Windows-viewer_version.txt
637-
# cp macOS-metadata/newview/viewer_version.txt macOS-viewer_version.txt
638-
# cp Linux-metadata/newview/viewer_version.txt Linux-viewer_version.txt
639-
640-
# # forked from softprops/action-gh-release
641-
# - name: Create GitHub release
642-
# id: release
643-
# uses: AlchemyViewer/action-gh-release@v2
644-
# with:
645-
# # name the release page for the branch
646-
# name: "${{ needs.setup.outputs.viewer_branch }}"
647-
# # SL-20546: want the channel and version to be visible on the
648-
# # release page
649-
# body: |
650-
# Build ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
651-
# ${{ needs.setup.outputs.viewer_channel }}
652-
# ${{ needs.build.outputs.viewer_version }}
653-
# ${{ needs.setup.outputs.relnotes }}
654-
# prerelease: true
655-
# generate_release_notes: true
656-
# target_commitish: ${{ github.sha }}
657-
# append_body: true
658-
# fail_on_unmatched_files: true
659-
# files: |
660-
# macOS-installer/*.dmg
661-
# Windows-installer/*.exe
662-
# *.tar.xz
663-
# *-viewer_version.txt
664-
# Windows-releases/*
665-
# macOS-releases/*
666-
667-
# - name: post release URL
668-
# run: |
669-
# echo "::notice::Release ${{ steps.release.outputs.url }}"
700+
# forked from softprops/action-gh-release
701+
- name: Create GitHub release
702+
id: release
703+
uses: AlchemyViewer/action-gh-release@v3
704+
with:
705+
# name the release page for the branch. We want channel and version.
706+
name: "${{ needs.build.outputs.viewer_channel }} ${{ needs.build.outputs.viewer_version }}"
707+
body: |
708+
prerelease: true
709+
generate_release_notes: true
710+
target_commitish: ${{ github.sha }}
711+
append_body: true
712+
fail_on_unmatched_files: true
713+
files: |
714+
Windows-installer/*.exe
715+
*.tar.xz
716+
Windows-releases/*
717+
718+
- name: post release URL
719+
run: |
720+
echo "::notice::Release ${{ steps.release.outputs.url }}"

dotnet-tools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"isRoot": true,
44
"tools": {
55
"vpk": {
6-
"version": "1.1.1",
6+
"version": "1.2.0",
77
"commands": [
88
"vpk"
99
],

indra/newview/viewer_manifest.py

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -270,16 +270,6 @@ def installer_base_name(self):
270270
}
271271
return "%(channel_vendor_base)s%(channel_variant_underscores)s_%(version_underscores)s_%(arch)s" % substitution_strings
272272

273-
def installer_base_name_mac(self):
274-
global CHANNEL_VENDOR_BASE
275-
# a standard map of strings for replacing in the templates
276-
substitution_strings = {
277-
'channel_vendor_base' : '_'.join(CHANNEL_VENDOR_BASE.split()),
278-
'channel_variant_underscores':self.channel_variant_app_suffix(),
279-
'version_underscores' : '_'.join(self.args['version'])
280-
}
281-
return "%(channel_vendor_base)s%(channel_variant_underscores)s_%(version_underscores)s_universal" % substitution_strings
282-
283273
def app_name(self):
284274
global CHANNEL_VENDOR_BASE
285275
channel_type=self.channel_type()
@@ -554,6 +544,12 @@ def package_finish(self):
554544
if self.args.get('velopack', 'OFF').upper() != 'ON' and self.args.get('velopack', 'OFF').upper() != 'TRUE' and self.args.get('velopack', 'OFF').upper() != '1':
555545
return
556546

547+
# Velopack packaging author metadata. This is the "Authors" field in the Velopack installer.
548+
pack_authors = 'Alchemy Viewer Project'
549+
550+
# Velopack splash progress bar color
551+
splash_color = '#00a5dc'
552+
557553
# packId determines install folder: %LocalAppData%\{packId}
558554
# Uses same naming as NSIS INSTNAME for channel separation
559555
pack_id = self.app_name_oneword() # "SecondLife", "SecondLifeBeta", etc.
@@ -600,9 +596,11 @@ def package_finish(self):
600596
self.set_github_output('velopack_pack_id', pack_id)
601597
self.set_github_output('velopack_pack_version', pack_version)
602598
self.set_github_output('velopack_pack_title', pack_title)
599+
self.set_github_output('velopack_pack_authors', pack_authors)
603600
self.set_github_output('velopack_main_exe', main_exe)
604601
self.set_github_output('velopack_icon', icon_filename)
605602
self.set_github_output('velopack_splash', splash_filename)
603+
self.set_github_output('velopack_splash_color', splash_color)
606604
self.set_github_output('velopack_installer_base', installer_base)
607605
self.set_github_output('velopack_exclude', exclude_pattern)
608606
# Set package_file so llmanifest's touched.bat logic doesn't crash
@@ -615,6 +613,7 @@ def package_finish(self):
615613
'dotnet', 'vpk', 'pack',
616614
'--packId', pack_id,
617615
'--packVersion', pack_version,
616+
'--packAuthors', pack_authors,
618617
'--packDir', pack_dir,
619618
'--mainExe', main_exe,
620619
'--packTitle', pack_title,
@@ -624,7 +623,7 @@ def package_finish(self):
624623
'--shortcuts', '',
625624
'--outputDir', os.path.join(self.args['build'], 'Releases'),
626625
'--splashImage', splash_path,
627-
'--splashProgressColor', '#00a5dc',
626+
'--splashProgressColor', splash_color,
628627
]
629628

630629
# Add icon — CMake copies the channel-appropriate secondlife.ico to res/ll_icon.ico
@@ -859,7 +858,7 @@ def path_optional(src, dst):
859858
self.package_file = "copied_deps"
860859

861860
def package_finish(self):
862-
imagename = self.installer_base_name_mac()
861+
imagename = self.installer_base_name()
863862
self.set_github_output('imagename', imagename)
864863
finalname = imagename + ".dmg"
865864
self.package_file = finalname

indra/vcpkg/ports/velopack/portfile.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ vcpkg_from_github(
22
OUT_SOURCE_PATH SOURCE_PATH
33
REPO velopack/velopack
44
REF ${VERSION}
5-
SHA512 c12703a623555adc56c0e8f7ea70e789caa616d2d6f2c5a53eda7bf55794feee125b6a97817e17114ccf19ca1b43d377f70b5f417b7c9d2befa9f381c57f9d53
5+
SHA512 5f782dcc2a172a90dd3e13130e00e6a2144cb679061cc6e7512029f5fb197a3278a9d5db00f3819ac5cbaa078211c18cee5cc2b0c24bbb8d77bda1825382c002
66
HEAD_REF main
77
)
88

indra/vcpkg/ports/velopack/vcpkg.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "velopack",
3-
"version-string": "1.1.1",
3+
"version-string": "1.2.0",
44
"description": "Installer and automatic update framework for cross-platform desktop applications",
55
"homepage": "https://velopack.io/",
66
"license": "MIT"

0 commit comments

Comments
 (0)