mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-26 12:15:34 +08:00
[fix] fix github actions scripts
This commit is contained in:
258
.github/workflows/other.bak
vendored
258
.github/workflows/other.bak
vendored
@@ -1,258 +0,0 @@
|
|||||||
name: Build and Release CrossDesk
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [release]
|
|
||||||
tags:
|
|
||||||
- "v*"
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
# Linux Job with CUDA container
|
|
||||||
build-linux:
|
|
||||||
name: Build on (ubuntu + CUDA)
|
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
container:
|
|
||||||
image: nvidia/cuda:12.6.3-devel-ubuntu22.04
|
|
||||||
options: --user root
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
working-directory: ${{ github.workspace }}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Install system dependencies
|
|
||||||
run: |
|
|
||||||
apt-get update
|
|
||||||
apt-get install -y \
|
|
||||||
git \
|
|
||||||
curl \
|
|
||||||
unzip \
|
|
||||||
software-properties-common \
|
|
||||||
build-essential \
|
|
||||||
libxcb-randr0-dev \
|
|
||||||
libxcb-xtest0-dev \
|
|
||||||
libxcb-xinerama0-dev \
|
|
||||||
libxcb-shape0-dev \
|
|
||||||
libxcb-xkb-dev \
|
|
||||||
libxcb-xfixes0-dev \
|
|
||||||
libxv-dev \
|
|
||||||
libxtst-dev \
|
|
||||||
libasound2-dev \
|
|
||||||
libsndio-dev \
|
|
||||||
libxcb-shm0-dev \
|
|
||||||
libxrandr-dev \
|
|
||||||
libpulse-dev
|
|
||||||
add-apt-repository ppa:xmake-io/xmake
|
|
||||||
apt-get update
|
|
||||||
apt-get install -y xmake
|
|
||||||
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
|
|
||||||
- name: Cache xmake dependencies
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: ~/.xmake/packages
|
|
||||||
key: linux-xmake-deps-intel-${{ hashFiles('**/xmake.lua') }}
|
|
||||||
restore-keys: |
|
|
||||||
linux-xmake-deps-intel-
|
|
||||||
|
|
||||||
- name: Build CrossDesk
|
|
||||||
run: xmake b -vy --root crossdesk
|
|
||||||
|
|
||||||
# - name: Package
|
|
||||||
# run: |
|
|
||||||
# chmod +x ./scripts/linux/pkg_x86_64.sh
|
|
||||||
# ./scripts/linux/pkg_x86_64.sh
|
|
||||||
|
|
||||||
# - name: Upload artifact
|
|
||||||
# uses: actions/upload-artifact@v4
|
|
||||||
# with:
|
|
||||||
# name: crossdesk-linux-x86_64
|
|
||||||
# path: ${{ github.workspace }}/build/linux/x86_64/release/crossdesk
|
|
||||||
|
|
||||||
# Non-Linux platforms (macOS, Windows)
|
|
||||||
build-other:
|
|
||||||
name: Build on (${{ matrix.runner }} ${{ matrix.arch }})
|
|
||||||
runs-on: ${{ matrix.runner }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- arch: x86_64
|
|
||||||
platform: macos
|
|
||||||
runner: macos-13
|
|
||||||
cache-key: intel
|
|
||||||
out-dir: ./build/macosx/x86_64/release/crossdesk
|
|
||||||
artifact-name: crossdesk-macos-x86_64
|
|
||||||
package_script: ./scripts/macosx/pkg_x86_64.sh
|
|
||||||
- arch: arm64
|
|
||||||
platform: macos
|
|
||||||
runner: macos-14
|
|
||||||
cache-key: arm
|
|
||||||
out-dir: ./build/macosx/arm64/release/crossdesk
|
|
||||||
artifact-name: crossdesk-macos-arm64
|
|
||||||
package_script: ./scripts/macosx/pkg_arm64.sh
|
|
||||||
- arch: x86_64
|
|
||||||
platform: windows
|
|
||||||
runner: windows-2022
|
|
||||||
cache-key: intel
|
|
||||||
out-dir: ./build/win/x86_64/release/crossdesk
|
|
||||||
artifact-name: crossdesk-win-x86_64
|
|
||||||
package_script: ./scripts/windows/nsis_script.nsi
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Initialize submodules
|
|
||||||
run: git submodule update --init --recursive
|
|
||||||
|
|
||||||
- name: Install xmake (macOS)
|
|
||||||
if: runner.os == 'macOS'
|
|
||||||
run: brew install xmake
|
|
||||||
|
|
||||||
- name: Install xmake (Windows)
|
|
||||||
if: runner.os == 'Windows'
|
|
||||||
run: |
|
|
||||||
Invoke-Expression (Invoke-Webrequest 'https://raw.githubusercontent.com/tboox/xmake/master/scripts/get.ps1' -UseBasicParsing).Content
|
|
||||||
echo "C:\Users\runneradmin\xmake" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
|
||||||
|
|
||||||
- name: Cache xmake dependencies (macOS)
|
|
||||||
if: runner.os == 'macOS'
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: ~/.xmake/packages
|
|
||||||
key: ${{ runner.os }}-xmake-deps-${{ matrix.cache-key }}-${{ hashFiles('**/xmake.lua') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-xmake-deps-${{ matrix.cache-key }}-
|
|
||||||
|
|
||||||
- name: Get LOCALAPPDATA path (Windows)
|
|
||||||
if: runner.os == 'Windows'
|
|
||||||
id: localappdata
|
|
||||||
run: |
|
|
||||||
echo "localappdata=$env:LOCALAPPDATA" >> $env:GITHUB_OUTPUT
|
|
||||||
shell: pwsh
|
|
||||||
|
|
||||||
- name: Cache xmake dependencies (Windows)
|
|
||||||
if: runner.os == 'Windows'
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: ${{ steps.localappdata.outputs.localappdata }}\.xmake\packages
|
|
||||||
key: ${{ runner.os }}-xmake-deps-${{ matrix.cache-key }}-${{ hashFiles('**/xmake.lua') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-xmake-deps-${{ matrix.cache-key }}-
|
|
||||||
|
|
||||||
- name: Build CrossDesk
|
|
||||||
run: xmake b -vy crossdesk
|
|
||||||
|
|
||||||
- name: Package
|
|
||||||
run: |
|
|
||||||
chmod +x ${{ matrix.package_script }}
|
|
||||||
${{ matrix.package_script }}
|
|
||||||
|
|
||||||
- name: Upload artifact
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: ${{ matrix.artifact-name }}
|
|
||||||
path: ${{ matrix.out-dir }}
|
|
||||||
|
|
||||||
# - name: Decode and save certificate
|
|
||||||
# shell: bash
|
|
||||||
# run: |
|
|
||||||
# mkdir -p certs
|
|
||||||
# echo "${{ secrets.CROSSDESK_CERT_BASE64 }}" | base64 --decode > certs/cert.crt
|
|
||||||
|
|
||||||
# - name: Package CrossDesk app
|
|
||||||
# if: runner.os != 'Windows'
|
|
||||||
# run: |
|
|
||||||
# chmod +x ${{ matrix.package_script }}
|
|
||||||
# ${{ matrix.package_script }}
|
|
||||||
|
|
||||||
# - name: Package CrossDesk app (Windows)
|
|
||||||
# if: runner.os == 'Windows'
|
|
||||||
# run: "& makensis.exe ${{ matrix.package_script }}"
|
|
||||||
# working-directory: ${{ github.workspace }}
|
|
||||||
|
|
||||||
# - name: Upload build artifacts
|
|
||||||
# uses: actions/upload-artifact@v4
|
|
||||||
# with:
|
|
||||||
# name: ${{ matrix.artifact-name }}-pkg
|
|
||||||
# path: crossdesk-${{ matrix.platform }}-${{ matrix.arch }}-v0.0.1.pkg
|
|
||||||
|
|
||||||
# - name: Move files to release dir
|
|
||||||
# run: |
|
|
||||||
# mkdir -p release
|
|
||||||
# cp crossdesk-${{ matrix.platform }}-${{ matrix.arch }}-v0.0.1.pkg release/
|
|
||||||
|
|
||||||
# release:
|
|
||||||
# name: Publish Release
|
|
||||||
# if: startsWith(github.ref, 'refs/tags/v')
|
|
||||||
# needs: build
|
|
||||||
# runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
# steps:
|
|
||||||
# - name: Checkout repository
|
|
||||||
# uses: actions/checkout@v4
|
|
||||||
|
|
||||||
# - name: Download all artifacts
|
|
||||||
# uses: actions/download-artifact@v4
|
|
||||||
# with:
|
|
||||||
# path: artifacts
|
|
||||||
|
|
||||||
# - name: Extract version number
|
|
||||||
# id: version
|
|
||||||
# run: |
|
|
||||||
# VERSION="${GITHUB_REF##*/}"
|
|
||||||
# VERSION_NUM="${VERSION#v}"
|
|
||||||
# echo "VERSION_NUM=${VERSION_NUM}" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
# - name: Rename artifacts
|
|
||||||
# run: |
|
|
||||||
# mkdir -p release
|
|
||||||
# cp artifacts/crossdesk-macos-x86_64-pkg/* release/crossdesk-macos-x86_64-v${{ steps.version.outputs.VERSION_NUM }}.pkg
|
|
||||||
# cp artifacts/crossdesk-macos-arm64-pkg/* release/crossdesk-macos-aarch64-v${{ steps.version.outputs.VERSION_NUM }}.pkg
|
|
||||||
|
|
||||||
# - name: Upload to Versioned GitHub Release
|
|
||||||
# uses: softprops/action-gh-release@v2
|
|
||||||
# with:
|
|
||||||
# tag_name: v${{ steps.version.outputs.VERSION_NUM }}
|
|
||||||
# name: Release v${{ steps.version.outputs.VERSION_NUM }}
|
|
||||||
# draft: false
|
|
||||||
# prerelease: false
|
|
||||||
# files: release/*
|
|
||||||
# generate_release_notes: false
|
|
||||||
# body: |
|
|
||||||
# Binary release only. Source code is not included.
|
|
||||||
|
|
||||||
# - name: Upload to 'latest' Release
|
|
||||||
# run: |
|
|
||||||
# mkdir -p release/latest
|
|
||||||
# cp release/crossdesk-macos-x86_64-v${{ steps.version.outputs.VERSION_NUM }}.pkg release/latest/crossdesk-macos-x86_64-latest.pkg
|
|
||||||
# cp release/crossdesk-macos-aarch64-v${{ steps.version.outputs.VERSION_NUM }}.pkg release/latest/crossdesk-macos-aarch64-latest.pkg
|
|
||||||
|
|
||||||
# - name: Create or update 'latest' tag
|
|
||||||
# run: |
|
|
||||||
# git config user.name "github-actions[bot]"
|
|
||||||
# git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
||||||
# git tag -f latest
|
|
||||||
# git push origin latest --force
|
|
||||||
|
|
||||||
# - name: Upload to GitHub Release (latest)
|
|
||||||
# uses: softprops/action-gh-release@v2
|
|
||||||
# with:
|
|
||||||
# tag_name: latest
|
|
||||||
# name: Latest Release
|
|
||||||
# draft: false
|
|
||||||
# prerelease: false
|
|
||||||
# files: |
|
|
||||||
# release/latest/crossdesk-macos-*.pkg
|
|
||||||
# generate_release_notes: false
|
|
||||||
#
|
|
||||||
58
.github/workflows/release.yaml
vendored
58
.github/workflows/release.yaml
vendored
@@ -35,6 +35,23 @@ jobs:
|
|||||||
ls -la $XMAKE_GLOBALDIR
|
ls -la $XMAKE_GLOBALDIR
|
||||||
xmake b -vy --root crossdesk
|
xmake b -vy --root crossdesk
|
||||||
|
|
||||||
|
- name: Decode and save certificate
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
mkdir -p certs
|
||||||
|
echo "${{ secrets.CROSSDESK_CERT_BASE64 }}" | base64 --decode > certs/crossdesk.cn_root.crt
|
||||||
|
|
||||||
|
- name: Package
|
||||||
|
run: |
|
||||||
|
chmod +x ./scripts/linux/pkg_x86_64.sh
|
||||||
|
./scripts/linux/pkg_x86_64.sh
|
||||||
|
|
||||||
|
- name: Upload artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: crossdesk-linux-x86_64
|
||||||
|
path: ${{ github.workspace }}/CrossDesk-0.0.1.deb
|
||||||
|
|
||||||
# macOS
|
# macOS
|
||||||
build-macos:
|
build-macos:
|
||||||
name: Build on macOS
|
name: Build on macOS
|
||||||
@@ -75,6 +92,28 @@ jobs:
|
|||||||
- name: Build CrossDesk
|
- name: Build CrossDesk
|
||||||
run: xmake b -vy crossdesk
|
run: xmake b -vy crossdesk
|
||||||
|
|
||||||
|
- name: Decode and save certificate
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
mkdir -p certs
|
||||||
|
echo "${{ secrets.CROSSDESK_CERT_BASE64 }}" | base64 --decode > certs/crossdesk.cn_root.crt
|
||||||
|
|
||||||
|
- name: Package CrossDesk app
|
||||||
|
run: |
|
||||||
|
chmod +x ${{ matrix.package_script }}
|
||||||
|
${{ matrix.package_script }}
|
||||||
|
|
||||||
|
- name: Upload build artifacts
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ${{ matrix.artifact-name }}
|
||||||
|
path: crossdesk-macos-${{ matrix.arch }}-v0.0.1.pkg
|
||||||
|
|
||||||
|
- name: Move files to release dir
|
||||||
|
run: |
|
||||||
|
mkdir -p release
|
||||||
|
cp crossdesk-macos-${{ matrix.arch }}-v0.0.1.pkg release/
|
||||||
|
|
||||||
# Windows
|
# Windows
|
||||||
build-windows:
|
build-windows:
|
||||||
name: Build on Windows
|
name: Build on Windows
|
||||||
@@ -106,7 +145,6 @@ jobs:
|
|||||||
$info = xmake require --info "cuda 12.6.3" 2>$null
|
$info = xmake require --info "cuda 12.6.3" 2>$null
|
||||||
if ($null -ne $info -and $info -ne "") {
|
if ($null -ne $info -and $info -ne "") {
|
||||||
$cudaPath = (($info | Select-String installdir).ToString() -replace '.*installdir:\s*','').Trim()
|
$cudaPath = (($info | Select-String installdir).ToString() -replace '.*installdir:\s*','').Trim()
|
||||||
Write-Host "Resolved CUDA_PATH = $cudaPath"
|
|
||||||
}
|
}
|
||||||
} catch {}
|
} catch {}
|
||||||
} else {
|
} else {
|
||||||
@@ -115,7 +153,6 @@ jobs:
|
|||||||
xmake require -vy "cuda 12.6.3"
|
xmake require -vy "cuda 12.6.3"
|
||||||
$info = xmake require --info "cuda 12.6.3"
|
$info = xmake require --info "cuda 12.6.3"
|
||||||
$cudaPath = (($info | Select-String installdir).ToString() -replace '.*installdir:\s*','').Trim()
|
$cudaPath = (($info | Select-String installdir).ToString() -replace '.*installdir:\s*','').Trim()
|
||||||
Write-Host "Resolved CUDA_PATH = $cudaPath"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "CUDA_PATH=$cudaPath" >> $env:GITHUB_ENV
|
echo "CUDA_PATH=$cudaPath" >> $env:GITHUB_ENV
|
||||||
@@ -130,3 +167,20 @@ jobs:
|
|||||||
|
|
||||||
- name: Build CrossDesk
|
- name: Build CrossDesk
|
||||||
run: xmake b -vy crossdesk
|
run: xmake b -vy crossdesk
|
||||||
|
|
||||||
|
- name: Decode and save certificate
|
||||||
|
shell: powershell
|
||||||
|
run: |
|
||||||
|
New-Item -ItemType Directory -Force -Path certs
|
||||||
|
[System.IO.File]::WriteAllBytes('certs\crossdesk.cn_root.crt', [Convert]::FromBase64String('${{ secrets.CROSSDESK_CERT_BASE64 }}'))
|
||||||
|
|
||||||
|
- name: Package
|
||||||
|
run: |
|
||||||
|
cd ./scripts/windows
|
||||||
|
makensis nsis_script.nsi
|
||||||
|
|
||||||
|
- name: Upload artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: crossdesk-win-x86_64
|
||||||
|
path: ${{ github.workspace }}/scripts/windows/CrossDesk-0.0.1.exe
|
||||||
|
|||||||
213
.github/workflows/release.yaml.bak
vendored
213
.github/workflows/release.yaml.bak
vendored
@@ -1,213 +0,0 @@
|
|||||||
name: Build and Release CrossDesk
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [release]
|
|
||||||
tags:
|
|
||||||
- "v*"
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
name: Build on (${{ matrix.runner }} ${{ matrix.arch }})
|
|
||||||
runs-on: ${{ matrix.runner }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- arch: x86_64
|
|
||||||
platform: macos
|
|
||||||
runner: macos-13
|
|
||||||
cache-key: intel
|
|
||||||
out-dir: ./build/macosx/x86_64/release/crossdesk
|
|
||||||
artifact-name: crossdesk-macos-x86_64
|
|
||||||
package_script: ./scripts/macosx/pkg_x86_64.sh
|
|
||||||
- arch: arm64
|
|
||||||
platform: macos
|
|
||||||
runner: macos-14
|
|
||||||
cache-key: arm
|
|
||||||
out-dir: ./build/macosx/arm64/release/crossdesk
|
|
||||||
artifact-name: crossdesk-macos-arm64
|
|
||||||
package_script: ./scripts/macosx/pkg_arm64.sh
|
|
||||||
- arch: x86_64
|
|
||||||
platform: windows
|
|
||||||
runner: windows-2022
|
|
||||||
cache-key: intel
|
|
||||||
out-dir: ./build/win/x86_64/release/crossdesk
|
|
||||||
artifact-name: crossdesk-win-x86_64
|
|
||||||
package_script: ./scripts/windows/nsis_script.nsi
|
|
||||||
- arch: x86_64
|
|
||||||
platform: linux
|
|
||||||
runner: ubuntu-22.04
|
|
||||||
cache-key: intel
|
|
||||||
out-dir: ./build/linux/x86_64/release/crossdesk
|
|
||||||
artifact-name: crossdesk-linux-x86_64
|
|
||||||
package_script: ./scripts/linux/pkg_x86_64.sh
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Initialize submodules
|
|
||||||
run: git submodule update --init --recursive
|
|
||||||
|
|
||||||
- name: Install xmake
|
|
||||||
if: runner.os == 'macOS'
|
|
||||||
run: brew install xmake
|
|
||||||
|
|
||||||
- name: Install xmake (Ubuntu)
|
|
||||||
if: runner.os == 'Linux'
|
|
||||||
run: |
|
|
||||||
curl -fsSL https://xmake.io/shget.text | bash
|
|
||||||
source ~/.xmake/profile
|
|
||||||
|
|
||||||
- name: Install system dependencies (Ubuntu)
|
|
||||||
if: runner.os == 'Linux'
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get -y install \
|
|
||||||
libxcb-randr0-dev \
|
|
||||||
libxcb-xtest0-dev \
|
|
||||||
libxcb-xinerama0-dev \
|
|
||||||
libxcb-shape0-dev \
|
|
||||||
libxcb-xkb-dev \
|
|
||||||
libxcb-xfixes0-dev \
|
|
||||||
libxv-dev \
|
|
||||||
libxtst-dev \
|
|
||||||
libasound2-dev \
|
|
||||||
libsndio-dev \
|
|
||||||
libxcb-shm0-dev \
|
|
||||||
libxrandr-dev \
|
|
||||||
libpulse-dev
|
|
||||||
|
|
||||||
- name: Install xmake (Windows)
|
|
||||||
if: runner.os == 'Windows'
|
|
||||||
run: |
|
|
||||||
Invoke-Expression (Invoke-Webrequest 'https://raw.githubusercontent.com/tboox/xmake/master/scripts/get.ps1' -UseBasicParsing).Content
|
|
||||||
echo "C:\Users\runneradmin\xmake" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
|
||||||
|
|
||||||
- name: Build CrossDesk
|
|
||||||
run: xmake b -vy crossdesk
|
|
||||||
|
|
||||||
- name: Cache xmake dependencies (Linux/macOS)
|
|
||||||
if: runner.os != 'Windows'
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: ~/.xmake/packages
|
|
||||||
key: ${{ runner.os }}-xmake-deps-${{ matrix.cache-key }}-${{ hashFiles('**/xmake.lua') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-xmake-deps-${{ matrix.cache-key }}-
|
|
||||||
|
|
||||||
- name: Get LOCALAPPDATA path (Windows)
|
|
||||||
if: runner.os == 'Windows'
|
|
||||||
id: localappdata
|
|
||||||
run: |
|
|
||||||
echo "localappdata=$env:LOCALAPPDATA" >> $env:GITHUB_OUTPUT
|
|
||||||
shell: pwsh
|
|
||||||
|
|
||||||
- name: Cache xmake dependencies (Windows)
|
|
||||||
if: runner.os == 'Windows'
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: ${{ steps.localappdata.outputs.localappdata }}\.xmake\packages
|
|
||||||
key: ${{ runner.os }}-xmake-deps-${{ matrix.cache-key }}-${{ hashFiles('**/xmake.lua') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-xmake-deps-${{ matrix.cache-key }}-
|
|
||||||
|
|
||||||
|
|
||||||
# - name: Decode and save certificate
|
|
||||||
# shell: bash
|
|
||||||
# run: |
|
|
||||||
# mkdir -p certs
|
|
||||||
# echo "${{ secrets.CROSSDESK_CERT_BASE64 }}" | base64 --decode > certs/cert.crt
|
|
||||||
|
|
||||||
# - name: Package CrossDesk app
|
|
||||||
# if: runner.os != 'Windows'
|
|
||||||
# run: |
|
|
||||||
# chmod +x ${{ matrix.package_script }}
|
|
||||||
# ${{ matrix.package_script }}
|
|
||||||
|
|
||||||
# - name: Package CrossDesk app (Windows)
|
|
||||||
# if: runner.os == 'Windows'
|
|
||||||
# run: "& makensis.exe ${{ matrix.package_script }}"
|
|
||||||
# working-directory: ${{ github.workspace }}
|
|
||||||
|
|
||||||
# - name: Upload build artifacts
|
|
||||||
# uses: actions/upload-artifact@v4
|
|
||||||
# with:
|
|
||||||
# name: ${{ matrix.artifact-name }}-pkg
|
|
||||||
# path: crossdesk-${{ matrix.platform }}-${{ matrix.arch }}-v0.0.1.pkg
|
|
||||||
|
|
||||||
# - name: Move files to release dir
|
|
||||||
# run: |
|
|
||||||
# mkdir -p release
|
|
||||||
# cp crossdesk-${{ matrix.platform }}-${{ matrix.arch }}-v0.0.1.pkg release/
|
|
||||||
|
|
||||||
# release:
|
|
||||||
# name: Publish Release
|
|
||||||
# if: startsWith(github.ref, 'refs/tags/v')
|
|
||||||
# needs: build
|
|
||||||
# runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
# steps:
|
|
||||||
# - name: Checkout repository
|
|
||||||
# uses: actions/checkout@v4
|
|
||||||
|
|
||||||
# - name: Download all artifacts
|
|
||||||
# uses: actions/download-artifact@v4
|
|
||||||
# with:
|
|
||||||
# path: artifacts
|
|
||||||
|
|
||||||
# - name: Extract version number
|
|
||||||
# id: version
|
|
||||||
# run: |
|
|
||||||
# VERSION="${GITHUB_REF##*/}"
|
|
||||||
# VERSION_NUM="${VERSION#v}"
|
|
||||||
# echo "VERSION_NUM=${VERSION_NUM}" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
# - name: Rename artifacts
|
|
||||||
# run: |
|
|
||||||
# mkdir -p release
|
|
||||||
# cp artifacts/crossdesk-macos-x86_64-pkg/* release/crossdesk-macos-x86_64-v${{ steps.version.outputs.VERSION_NUM }}.pkg
|
|
||||||
# cp artifacts/crossdesk-macos-arm64-pkg/* release/crossdesk-macos-aarch64-v${{ steps.version.outputs.VERSION_NUM }}.pkg
|
|
||||||
|
|
||||||
# - name: Upload to Versioned GitHub Release
|
|
||||||
# uses: softprops/action-gh-release@v2
|
|
||||||
# with:
|
|
||||||
# tag_name: v${{ steps.version.outputs.VERSION_NUM }}
|
|
||||||
# name: Release v${{ steps.version.outputs.VERSION_NUM }}
|
|
||||||
# draft: false
|
|
||||||
# prerelease: false
|
|
||||||
# files: release/*
|
|
||||||
# generate_release_notes: false
|
|
||||||
# body: |
|
|
||||||
# Binary release only. Source code is not included.
|
|
||||||
|
|
||||||
# - name: Upload to 'latest' Release
|
|
||||||
# run: |
|
|
||||||
# mkdir -p release/latest
|
|
||||||
# cp release/crossdesk-macos-x86_64-v${{ steps.version.outputs.VERSION_NUM }}.pkg release/latest/crossdesk-macos-x86_64-latest.pkg
|
|
||||||
# cp release/crossdesk-macos-aarch64-v${{ steps.version.outputs.VERSION_NUM }}.pkg release/latest/crossdesk-macos-aarch64-latest.pkg
|
|
||||||
|
|
||||||
# - name: Create or update 'latest' tag
|
|
||||||
# run: |
|
|
||||||
# git config user.name "github-actions[bot]"
|
|
||||||
# git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
||||||
# git tag -f latest
|
|
||||||
# git push origin latest --force
|
|
||||||
|
|
||||||
# - name: Upload to GitHub Release (latest)
|
|
||||||
# uses: softprops/action-gh-release@v2
|
|
||||||
# with:
|
|
||||||
# tag_name: latest
|
|
||||||
# name: Latest Release
|
|
||||||
# draft: false
|
|
||||||
# prerelease: false
|
|
||||||
# files: |
|
|
||||||
# release/latest/crossdesk-macos-*.pkg
|
|
||||||
# generate_release_notes: false
|
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
; <20>ýű<EFBFBD>ʹ<EFBFBD><EFBFBD> HM VNISEdit <20>ű<EFBFBD><C5B1>༭<EFBFBD><E0BCAD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
; <20><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><EFBFBD>
|
||||||
|
!addincludedir "${__FILEDIR__}"
|
||||||
|
|
||||||
; <20><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC><EFBFBD>峣<EFBFBD><E5B3A3>
|
; <20><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC><EFBFBD>峣<EFBFBD><E5B3A3>
|
||||||
!define PRODUCT_NAME "CrossDesk"
|
!define PRODUCT_NAME "CrossDesk"
|
||||||
@@ -8,14 +9,16 @@
|
|||||||
!define APP_NAME "CrossDesk"
|
!define APP_NAME "CrossDesk"
|
||||||
!define UNINSTALL_REG_KEY "CrossDesk"
|
!define UNINSTALL_REG_KEY "CrossDesk"
|
||||||
|
|
||||||
;<3B>ﰲװ<EFBFBD><EFBFBD>ͼ<EFBFBD><EFBFBD>
|
; <20><><EFBFBD>ð<EFBFBD>װ<EFBFBD><EFBFBD>ͼ<EFBFBD><EFBFBD>·<EFBFBD><EFBFBD>
|
||||||
Icon "icons\crossdesk.ico"
|
!define MUI_ICON "${__FILEDIR__}\..\..\icons\crossdesk.ico"
|
||||||
!define MUI_ICON "icons\crossdesk.ico"
|
|
||||||
|
|
||||||
;<3B><>ѹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD>֤<EFBFBD><EFBFBD>·<EFBFBD><EFBFBD>
|
||||||
|
!define CERT_FILE "${__FILEDIR__}\..\..\certs\crossdesk.cn_root.crt"
|
||||||
|
|
||||||
|
; ѹ<><D1B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
SetCompressor /FINAL lzma
|
SetCompressor /FINAL lzma
|
||||||
|
|
||||||
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ԱȨ<EFBFBD>ޣ<EFBFBD>д<EFBFBD><EFBFBD>HKLM<EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD>
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ԱȨ<EFBFBD>ޣ<EFBFBD>д<EFBFBD><EFBFBD>HKLM<EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD>
|
||||||
RequestExecutionLevel admin
|
RequestExecutionLevel admin
|
||||||
|
|
||||||
; ------ MUI <20>ִ<EFBFBD><D6B4><EFBFBD><EFBFBD>涨<EFBFBD><E6B6A8> ------
|
; ------ MUI <20>ִ<EFBFBD><D6B4><EFBFBD><EFBFBD>涨<EFBFBD><E6B6A8> ------
|
||||||
@@ -38,13 +41,13 @@ Section "MainSection"
|
|||||||
SetOutPath "$INSTDIR"
|
SetOutPath "$INSTDIR"
|
||||||
SetOverwrite ifnewer
|
SetOverwrite ifnewer
|
||||||
|
|
||||||
;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
|
; <EFBFBD><EFBFBD><EFBFBD>ó<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>·<EFBFBD><EFBFBD>
|
||||||
File /oname=crossdesk.exe "build\windows\x64\release\crossdesk\crossdesk.exe"
|
File /oname=crossdesk.exe "..\..\build\windows\x64\release\crossdesk.exe"
|
||||||
|
|
||||||
; ? <20><><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>װĿ¼
|
; ? <20><><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>װĿ¼
|
||||||
File "icons\crossdesk.ico"
|
File "${MUI_ICON}"
|
||||||
|
|
||||||
;<EFBFBD><EFBFBD>д<EFBFBD><EFBFBD>ж<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
; д<EFBFBD><EFBFBD>ж<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
||||||
WriteUninstaller "$INSTDIR\uninstall.exe"
|
WriteUninstaller "$INSTDIR\uninstall.exe"
|
||||||
|
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${UNINSTALL_REG_KEY}" "DisplayName" "${PRODUCT_NAME}"
|
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${UNINSTALL_REG_KEY}" "DisplayName" "${PRODUCT_NAME}"
|
||||||
@@ -59,17 +62,17 @@ SectionEnd
|
|||||||
|
|
||||||
Section "Cert"
|
Section "Cert"
|
||||||
SetOutPath "$APPDATA\CrossDesk\certs"
|
SetOutPath "$APPDATA\CrossDesk\certs"
|
||||||
File /r "certs\crossdesk.cn_root.crt"
|
File /r "${CERT_FILE}"
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
Section -AdditionalIcons
|
Section -AdditionalIcons
|
||||||
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݷ<EFBFBD>ʽ
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݷ<EFBFBD>ʽ
|
||||||
CreateShortCut "$DESKTOP\${PRODUCT_NAME}.lnk" "$INSTDIR\crossdesk.exe" "" "$INSTDIR\crossdesk.ico"
|
CreateShortCut "$DESKTOP\${PRODUCT_NAME}.lnk" "$INSTDIR\crossdesk.exe" "" "$INSTDIR\crossdesk.ico"
|
||||||
|
|
||||||
;<3B>↑ʼ<EFBFBD>˵<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݷ<EFBFBD>ʽ
|
; <20><EFBFBD>ʼ<EFBFBD>˵<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݷ<EFBFBD>ʽ
|
||||||
CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}.lnk" "$INSTDIR\crossdesk.exe" "" "$INSTDIR\crossdesk.ico"
|
CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}.lnk" "$INSTDIR\crossdesk.exe" "" "$INSTDIR\crossdesk.ico"
|
||||||
|
|
||||||
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҳ<EFBFBD><EFBFBD><EFBFBD>ݷ<EFBFBD>ʽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>棩
|
; <EFBFBD><EFBFBD>ҳ<EFBFBD><EFBFBD><EFBFBD>ݷ<EFBFBD>ʽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>棩
|
||||||
WriteIniStr "$DESKTOP\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
|
WriteIniStr "$DESKTOP\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user