|
26 | 26 | branches: ["main", "release/*", "beta/*", "project/*"] |
27 | 27 | tags: ["Alchemy*"] |
28 | 28 |
|
| 29 | +permissions: |
| 30 | + contents: read |
| 31 | + |
29 | 32 | jobs: |
30 | 33 | # The whole point of the setup job is that we want to set variables once |
31 | 34 | # that will be consumed by multiple subsequent jobs. |
|
56 | 59 | - name: Setup python |
57 | 60 | uses: actions/setup-python@v6 |
58 | 61 | with: |
59 | | - python-version: "3.13" |
| 62 | + python-version: "3.14" |
60 | 63 |
|
61 | 64 | - name: Determine source branch |
62 | 65 | id: which-branch |
@@ -160,10 +163,13 @@ jobs: |
160 | 163 | # Windows Velopack outputs (passed to sign-pkg-windows) |
161 | 164 | velopack_pack_id: ${{ steps.build.outputs.velopack_pack_id }} |
162 | 165 | velopack_pack_version: ${{ steps.build.outputs.velopack_pack_version }} |
| 166 | + velopack_pack_authors: ${{ steps.build.outputs.velopack_pack_authors }} |
163 | 167 | velopack_pack_title: ${{ steps.build.outputs.velopack_pack_title }} |
164 | 168 | velopack_main_exe: ${{ steps.build.outputs.velopack_main_exe }} |
165 | 169 | velopack_exclude: ${{ steps.build.outputs.velopack_exclude }} |
166 | 170 | velopack_icon: ${{ steps.build.outputs.velopack_icon }} |
| 171 | + velopack_splash: ${{ steps.build.outputs.velopack_splash }} |
| 172 | + velopack_splash_color: ${{ steps.build.outputs.velopack_splash_color }} |
167 | 173 | velopack_installer_base: ${{ steps.build.outputs.velopack_installer_base }} |
168 | 174 | # macOS Velopack outputs (passed to sign-pkg-mac) |
169 | 175 | velopack_mac_pack_id: ${{ steps.build.outputs.velopack_mac_pack_id }} |
@@ -254,14 +260,6 @@ jobs: |
254 | 260 | - name: Install python dependencies |
255 | 261 | run: pip3 install llsd cmake ninja |
256 | 262 |
|
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 | | - |
265 | 263 | - name: Bootstrap vcpkg Windows |
266 | 264 | if: runner.os == 'Windows' |
267 | 265 | run: | |
@@ -472,34 +470,109 @@ jobs: |
472 | 470 | # ${{ steps.configure.outputs.build_directory }}/llappearanceutility/Release/appearance-utility-bin |
473 | 471 | # ${{ steps.configure.outputs.build_directory }}/llappearanceutility/Release/appearance-utility-headless-bin |
474 | 472 |
|
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 }}" |
| 473 | + sign-and-package-windows: |
| 474 | + needs: [setup, build] |
| 475 | + runs-on: windows-2025 |
| 476 | + if: needs.setup.outputs.build_type == 'proprietary' |
| 477 | + steps: |
| 478 | + - name: Checkout code |
| 479 | + uses: actions/checkout@v7 |
| 480 | + with: |
| 481 | + submodules: recursive |
| 482 | + ref: ${{ github.event.pull_request.head.sha || github.sha }} |
| 483 | + |
| 484 | + - name: Setup .NET for Velopack |
| 485 | + uses: actions/setup-dotnet@v5 |
| 486 | + with: |
| 487 | + dotnet-version: '10.x' |
| 488 | + |
| 489 | + - name: Install Velopack CLI |
| 490 | + run: dotnet tool restore |
| 491 | + |
| 492 | + - name: Fetch Windows app |
| 493 | + uses: actions/download-artifact@v8 |
| 494 | + with: |
| 495 | + name: Windows-x64-app |
| 496 | + path: .app |
| 497 | + |
| 498 | + - name: Build and sign Velopack package |
| 499 | + shell: bash |
| 500 | + env: |
| 501 | + PACK_ID: ${{ needs.build.outputs.velopack_pack_id }} |
| 502 | + PACK_VERSION: ${{ needs.build.outputs.velopack_pack_version }} |
| 503 | + PACK_TITLE: ${{ needs.build.outputs.velopack_pack_title }} |
| 504 | + PACK_AUTHORS: ${{ needs.build.outputs.velopack_pack_authors }} |
| 505 | + MAIN_EXE: ${{ needs.build.outputs.velopack_main_exe }} |
| 506 | + EXCLUDE: ${{ needs.build.outputs.velopack_exclude }} |
| 507 | + ICON: ${{ needs.build.outputs.velopack_icon }} |
| 508 | + SPLASH_IMAGE: ${{ needs.build.outputs.velopack_splash }} |
| 509 | + SPLASH_COLOR: ${{ needs.build.outputs.velopack_splash_color }} |
| 510 | + INSTALLER_BASE: ${{ needs.build.outputs.velopack_installer_base }} |
| 511 | + run: | |
| 512 | + set -x |
| 513 | +
|
| 514 | + vpk_args=( |
| 515 | + vpk pack |
| 516 | + --packId "$PACK_ID" |
| 517 | + --packVersion "$PACK_VERSION" |
| 518 | + --packAuthors "$PACK_AUTHORS" |
| 519 | + --packDir .app |
| 520 | + --mainExe "$MAIN_EXE" |
| 521 | + --packTitle "$PACK_TITLE" |
| 522 | + --exclude "$EXCLUDE" |
| 523 | + --shortcuts '' |
| 524 | + --splashProgressColor "$SPLASH_COLOR" |
| 525 | + ) |
| 526 | +
|
| 527 | + # Add icon if provided |
| 528 | + if [[ -n "$ICON" && -f ".app/$ICON" ]]; then |
| 529 | + vpk_args+=(--icon ".app/$ICON") |
| 530 | + fi |
| 531 | +
|
| 532 | + # Add splash if provided |
| 533 | + if [[ -n "$SPLASH_IMAGE" && -f ".app/$SPLASH_IMAGE" ]]; then |
| 534 | + vpk_args+=(--splashImage ".app/$SPLASH_IMAGE") |
| 535 | + fi |
| 536 | +
|
| 537 | + "${vpk_args[@]}" |
| 538 | +
|
| 539 | + - name: Rename Velopack outputs |
| 540 | + shell: bash |
| 541 | + env: |
| 542 | + PACK_ID: ${{ needs.build.outputs.velopack_pack_id }} |
| 543 | + INSTALLER_BASE: ${{ needs.build.outputs.velopack_installer_base }} |
| 544 | + run: | |
| 545 | + # Move Setup.exe into .app for the installer upload step |
| 546 | + setup="Releases/${PACK_ID}-win-Setup.exe" |
| 547 | + if [[ -f "$setup" ]]; then |
| 548 | + mv "$setup" ".app/${INSTALLER_BASE}_Setup.exe" |
| 549 | + echo "Moved $setup to .app/${INSTALLER_BASE}_Setup.exe" |
| 550 | + fi |
| 551 | +
|
| 552 | + # Rename Portable.zip to include version |
| 553 | + portable="Releases/${PACK_ID}-win-Portable.zip" |
| 554 | + if [[ -f "$portable" ]]; then |
| 555 | + mv "$portable" "Releases/${INSTALLER_BASE}_Portable.zip" |
| 556 | + echo "Moved $portable to Releases/${INSTALLER_BASE}_Portable.zip" |
| 557 | + fi |
| 558 | +
|
| 559 | + - name: Find Velopack installer |
| 560 | + shell: bash |
| 561 | + run: | |
| 562 | + installer="$(ls -t .app/*_Setup.exe | head -n 1)" |
| 563 | + echo "installer=$installer" >> "$GITHUB_ENV" |
| 564 | +
|
| 565 | + - name: Post the installer |
| 566 | + uses: actions/upload-artifact@v7 |
| 567 | + with: |
| 568 | + name: "Windows-installer" |
| 569 | + path: ${{ env.installer }} |
| 570 | + |
| 571 | + - name: Upload Velopack releases |
| 572 | + uses: actions/upload-artifact@v7 |
| 573 | + with: |
| 574 | + name: "Windows-releases" |
| 575 | + path: Releases/ |
503 | 576 |
|
504 | 577 | # sign-and-package-mac: |
505 | 578 | # env: |
@@ -610,60 +683,43 @@ jobs: |
610 | 683 | # node-version: "22" |
611 | 684 | # dumpSyms: false |
612 | 685 |
|
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" |
| 686 | + release: |
| 687 | + needs: [setup, build, sign-and-package-windows] |
| 688 | + runs-on: ubuntu-latest |
| 689 | + if: needs.setup.outputs.release_run |
| 690 | + permissions: |
| 691 | + contents: write |
| 692 | + steps: |
| 693 | + - uses: actions/download-artifact@v8 |
| 694 | + with: |
| 695 | + pattern: "*-installer" |
625 | 696 |
|
626 | | - # - uses: actions/download-artifact@v8 |
627 | | - # with: |
628 | | - # pattern: "*-releases" |
| 697 | + - uses: actions/download-artifact@v8 |
| 698 | + with: |
| 699 | + pattern: "*-releases" |
629 | 700 |
|
630 | | - # - uses: actions/download-artifact@v8 |
631 | | - # with: |
632 | | - # name: "Linux-app" |
| 701 | + - uses: actions/download-artifact@v8 |
| 702 | + with: |
| 703 | + name: "Linux-x64-app" |
633 | 704 |
|
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 }}" |
| 705 | + # forked from softprops/action-gh-release |
| 706 | + - name: Create GitHub release |
| 707 | + id: release |
| 708 | + uses: AlchemyViewer/action-gh-release@v3 |
| 709 | + with: |
| 710 | + # name the release page for the branch. We want channel and version. |
| 711 | + name: "${{ needs.setup.outputs.viewer_channel }} ${{ needs.build.outputs.viewer_version }}" |
| 712 | + body: | |
| 713 | + prerelease: true |
| 714 | + generate_release_notes: true |
| 715 | + target_commitish: ${{ github.sha }} |
| 716 | + append_body: true |
| 717 | + fail_on_unmatched_files: true |
| 718 | + files: | |
| 719 | + Windows-installer/*.exe |
| 720 | + *.tar.xz |
| 721 | + Windows-releases/* |
| 722 | +
|
| 723 | + - name: post release URL |
| 724 | + run: | |
| 725 | + echo "::notice::Release ${{ steps.release.outputs.url }}" |
0 commit comments