From 163ab81ca89729a8016719c50b5caae1ab188070 Mon Sep 17 00:00:00 2001 From: Jonson Petard <41122242+greenhat616@users.noreply.github.com> Date: Fri, 22 Dec 2023 08:57:37 +0800 Subject: [PATCH 1/2] fix(ci): updater and dev build --- .github/workflows/dev.yaml | 74 +++-- .gitignore | 3 + .prettierignore | 1 + backend/tauri/Cargo.toml | 2 + backend/tauri/build.rs | 10 + backend/tauri/overrides/nightly.conf.json | 15 ++ backend/tauri/src/config/prfitem.rs | 2 +- backend/tauri/src/core/tray.rs | 2 +- backend/tauri/src/utils/dirs.rs | 6 +- backend/tauri/tauri.nightly.conf.json | 93 ------- backend/tauri/templates/nightly.wxs | 311 ++++++++++++++++++++++ scripts/prepare-nightly.ts | 40 ++- scripts/publish.ts | 2 +- scripts/updater-nightly.ts | 44 ++- 14 files changed, 467 insertions(+), 138 deletions(-) create mode 100644 backend/tauri/overrides/nightly.conf.json delete mode 100644 backend/tauri/tauri.nightly.conf.json create mode 100644 backend/tauri/templates/nightly.wxs diff --git a/.github/workflows/dev.yaml b/.github/workflows/dev.yaml index 939ede0a1d..3ed9312df8 100644 --- a/.github/workflows/dev.yaml +++ b/.github/workflows/dev.yaml @@ -15,10 +15,20 @@ jobs: release: strategy: matrix: - os: [windows-latest, ubuntu-latest, macos-latest] - - runs-on: ${{ matrix.os }} - if: startsWith(github.repository, 'keiko233') + targets: + - os: windows-latest + category: nsis # and portable + - os: windows-latest + category: msi + - os: ubuntu-latest + category: all + - os: macos-13 + category: amd64 + - os: macos-13 + category: aarch64 + + runs-on: ${{ matrix.targets.os }} + # if: startsWith(github.repository, 'keiko233') steps: - name: Checkout repository uses: actions/checkout@v4 @@ -32,10 +42,10 @@ jobs: uses: Swatinem/rust-cache@v2 with: workspaces: src-tauri - key: ${{ matrix.os }} + key: ${{ matrix.targets.os }} - name: Install the missing rust target (macOS Only) - if: startsWith(matrix.os, 'macos-') + if: startsWith(matrix.targets.os, 'macos-') run: | rustup target add aarch64-apple-darwin @@ -51,7 +61,7 @@ jobs: run_install: false - name: Delete current release assets - if: startsWith(matrix.os, 'ubuntu-') + if: startsWith(matrix.targets.os, 'ubuntu-') uses: mknejp/delete-release-assets@v1 with: token: ${{ secrets.GH_TOKEN }} @@ -70,17 +80,32 @@ jobs: *.json - name: Install Dependencies (Ubuntu Only) - if: startsWith(matrix.os, 'ubuntu-') + if: startsWith(matrix.targets.os, 'ubuntu-') run: | sudo apt-get update sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf openssl - + - uses: maxim-lobanov/setup-xcode@v1 + if: startsWith(matrix.targets.os, 'macos-') + with: + xcode-version: "15.0" - name: Pnpm install and check run: | pnpm i - pnpm check && pnpm prepare:nightly - + pnpm check + - name: Nightly Prepare + if: startsWith(matrix.targets.os, 'windows-') == false + run: | + pnpm prepare:nightly + - name: Nightly Prepare (MSI only) + if: startsWith(matrix.targets.os, 'windows-') && matrix.targets.category == 'msi' + run: | + pnpm prepare:nightly --msi + - name: Nightly Prepare (Windows NSIS and Portable) + if: startsWith(matrix.targets.os, 'windows-') && matrix.targets.category == 'nsis' + run: | + pnpm prepare:nightly --nsis - name: Tauri build + if: startsWith(matrix.targets.os, 'macos-') == false || matrix.targets.category != 'aarch64' uses: tauri-apps/tauri-action@v0 env: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} @@ -92,11 +117,10 @@ jobs: releaseBody: "More new features are now supported." releaseDraft: false prerelease: true - tauriScript: pnpm + tauriScript: pnpm tauri args: -f default-meta nightly -c ./backend/tauri/tauri.nightly.conf.json - - name: Portable Bundle (Windows Only) - if: matrix.os == 'windows-latest' + if: startsWith(matrix.targets.os, 'windows-') && matrix.targets.category == 'nsis' run: | pnpm portable env: @@ -107,12 +131,12 @@ jobs: VITE_WIN_PORTABLE: 1 - name: Pnpm check (macOS aarch64) - if: startsWith(matrix.os, 'macos-') + if: startsWith(matrix.targets.os, 'macos-') && matrix.targets.category == 'aarch64' run: | pnpm check --arch arm64 --sidecar-host aarch64-apple-darwin - name: Tauri build with Upload (macOS aarch64) - if: startsWith(matrix.os, 'macos-') + if: startsWith(matrix.targets.os, 'macos-') && matrix.targets.category == 'aarch64' env: TAG_NAME: pre-release GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} @@ -126,7 +150,7 @@ jobs: name: Update tag runs-on: ubuntu-latest needs: [release] - if: startsWith(github.repository, 'keiko233') + # if: startsWith(github.repository, 'keiko233') steps: - name: Checkout repository uses: actions/checkout@v4 @@ -146,23 +170,25 @@ jobs: cat > release.txt << 'EOF' ## Clash Nyanpasu Nightly Build Release created at ${{ env.BUILDTIME }}. - Daily build of Clash Nyanpasu Dev branch. - [See the development log here](https://t.me/keikolog/462) + Daily build of **Clash Nyanpasu** on *dev* branch. + ***[See the development log here](https://t.me/keikolog/462)*** EOF - name: Update Release - uses: ncipollo/release-action@v1 + uses: softprops/action-gh-release@v1 with: name: Clash Nyanpasu Dev - tag: pre-release - bodyFile: release.txt + tag_name: pre-release + body_path: release.txt prerelease: true + generate_release_notes: true + target_commitish: dev env: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} updater: - name: Update Nigthly Updater + name: Update Nightly Updater runs-on: ubuntu-latest needs: [release, update_tag] - if: startsWith(github.repository, 'keiko233') + # if: startsWith(github.repository, 'keiko233') steps: - name: Checkout repository uses: actions/checkout@v4 diff --git a/.gitignore b/.gitignore index c6af1a81b2..bcddfa6027 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,6 @@ scripts/_env.sh .eslintcache .stylelintcache + +tauri.nightly.conf.json + diff --git a/.prettierignore b/.prettierignore index f4f73090f7..dade694ee7 100644 --- a/.prettierignore +++ b/.prettierignore @@ -5,3 +5,4 @@ dist/ **/node_modules/ pnpm-lock.yaml *.lock +*.wxs diff --git a/backend/tauri/Cargo.toml b/backend/tauri/Cargo.toml index 2a711bffc9..fedd456e17 100644 --- a/backend/tauri/Cargo.toml +++ b/backend/tauri/Cargo.toml @@ -11,6 +11,8 @@ build = "build.rs" [build-dependencies] tauri-build = { version = "1", features = [] } +serde = "1" +simd-json = "0.13" [dependencies] warp = "0.3" diff --git a/backend/tauri/build.rs b/backend/tauri/build.rs index d860e1e6a7..0e31e146e6 100644 --- a/backend/tauri/build.rs +++ b/backend/tauri/build.rs @@ -1,3 +1,13 @@ +use serde::Deserialize; +use std::fs::read; +#[derive(Deserialize)] +struct PackageJson { + version: String, // we only need the version +} + fn main() { + let mut pkg_json = read("../../package.json").unwrap(); + let pkg_json: PackageJson = simd_json::from_slice(&mut pkg_json).unwrap(); + println!("cargo:rustc-env=NYANPASU_VERSION={}", pkg_json.version); tauri_build::build() } diff --git a/backend/tauri/overrides/nightly.conf.json b/backend/tauri/overrides/nightly.conf.json new file mode 100644 index 0000000000..f45f651e30 --- /dev/null +++ b/backend/tauri/overrides/nightly.conf.json @@ -0,0 +1,15 @@ +{ + "$schema": "https://raw.githubusercontent.com/tauri-apps/tauri/1.x/tooling/cli/schema.json", + "package": { + "version": "1.4.2" + }, + "tauri": { + "updater": { + "endpoints": [ + "https://mirror.ghproxy.com/https://github.com/keiko233/clash-nyanpasu/releases/download/updater/update-nightly-proxy.json", + "https://ghproxy.com/https://github.com/keiko233/clash-nyanpasu/releases/download/updater/update-nightly-proxy.json", + "https://github.com/keiko233/clash-nyanpasu/releases/download/updater/update-nightly.json" + ] + } + } +} diff --git a/backend/tauri/src/config/prfitem.rs b/backend/tauri/src/config/prfitem.rs index 86866e02fe..689619998e 100644 --- a/backend/tauri/src/config/prfitem.rs +++ b/backend/tauri/src/config/prfitem.rs @@ -232,7 +232,7 @@ impl PrfItem { } let version = unsafe { dirs::APP_VERSION }; - let version = format!("clash-verge/{version}"); + let version = format!("clash-verge/v{version}"); builder = builder.user_agent(user_agent.unwrap_or(version)); let resp = builder.build()?.get(url).send().await?; diff --git a/backend/tauri/src/core/tray.rs b/backend/tauri/src/core/tray.rs index f72a9ef10b..2a1fe26fd9 100644 --- a/backend/tauri/src/core/tray.rs +++ b/backend/tauri/src/core/tray.rs @@ -13,7 +13,7 @@ impl Tray { pub fn tray_menu(app_handle: &AppHandle) -> SystemTrayMenu { let zh = { Config::verge().latest().language == Some("zh".into()) }; - let version = app_handle.package_info().version.to_string(); + let version = env!("NYANPASU_VERSION"); macro_rules! t { ($en: expr, $zh: expr) => { diff --git a/backend/tauri/src/utils/dirs.rs b/backend/tauri/src/utils/dirs.rs index e9dbd6afc7..e5ed41eded 100644 --- a/backend/tauri/src/utils/dirs.rs +++ b/backend/tauri/src/utils/dirs.rs @@ -21,7 +21,7 @@ static mut RESOURCE_DIR: Option = None; #[allow(unused)] static mut PORTABLE_FLAG: bool = false; -pub static mut APP_VERSION: &str = "v1.2.0"; +pub static mut APP_VERSION: &str = env!("NYANPASU_VERSION"); /// initialize portable flag #[cfg(target_os = "windows")] @@ -77,10 +77,6 @@ pub fn app_resources_dir(package_info: &PackageInfo) -> Result { unsafe { RESOURCE_DIR = Some(res_dir.clone()); - - let ver = package_info.version.to_string(); - let ver_str = format!("v{ver}"); - APP_VERSION = Box::leak(Box::new(ver_str)); } Ok(res_dir) diff --git a/backend/tauri/tauri.nightly.conf.json b/backend/tauri/tauri.nightly.conf.json deleted file mode 100644 index 052bd7ccb0..0000000000 --- a/backend/tauri/tauri.nightly.conf.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "package": { - "productName": "Clash Nyanpasu", - "version": "1.4.2" - }, - "build": { - "distDir": "../../dist", - "devPath": "http://localhost:3000/", - "beforeDevCommand": "pnpm run web:dev", - "beforeBuildCommand": "pnpm run web:build" - }, - "tauri": { - "systemTray": { - "iconPath": "icons/win-tray-icon.png", - "iconAsTemplate": true - }, - "bundle": { - "active": true, - "targets": "all", - "identifier": "moe.elaina.clash.nyanpasu", - "icon": [ - "icons/32x32.png", - "icons/128x128.png", - "icons/128x128@2x.png", - "icons/icon-new.icns", - "icons/icon.ico" - ], - "resources": ["resources"], - "externalBin": [ - "sidecar/clash", - "sidecar/mihomo", - "sidecar/mihomo-alpha", - "sidecar/clash-rs" - ], - "copyright": "© 2022 zzzgydi All Rights Reserved", - "category": "DeveloperTool", - "shortDescription": "Clash Nyanpasu! (∠・ω< )⌒☆", - "longDescription": "Clash Nyanpasu! (∠・ω< )⌒☆", - "deb": { - "depends": ["openssl"] - }, - "macOS": { - "frameworks": [], - "minimumSystemVersion": "", - "exceptionDomain": "", - "signingIdentity": null, - "entitlements": null - }, - "windows": { - "certificateThumbprint": null, - "digestAlgorithm": "sha256", - "timestampUrl": "", - "wix": { - "language": ["zh-CN", "en-US", "ru-RU"] - } - } - }, - "updater": { - "active": true, - "endpoints": [ - "https://mirror.ghproxy.com/https://github.com/keiko233/clash-nyanpasu/releases/download/updater/update-nightly-proxy.json", - "https://ghproxy.com/https://github.com/keiko233/clash-nyanpasu/releases/download/updater/update-nightly-proxy.json", - "https://github.com/keiko233/clash-nyanpasu/releases/download/updater/update-nightly.json" - ], - "dialog": false, - "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDlBMUM0NjMxREZCNDRGMjYKUldRbVQ3VGZNVVljbW43N0FlWjA4UkNrbTgxSWxSSXJQcExXNkZjUTlTQkIyYkJzL0tsSWF2d0cK" - }, - "allowlist": { - "shell": { - "all": true - }, - "window": { - "all": true - }, - "process": { - "all": true - }, - "globalShortcut": { - "all": true - }, - "notification": { - "all": true - }, - "os": { - "all": true - } - }, - "windows": [], - "security": { - "csp": "script-src 'unsafe-eval' 'self'; default-src blob: data: filesystem: ws: wss: http: https: tauri: 'unsafe-eval' 'unsafe-inline' 'self'; img-src data: 'self';" - } - } -} diff --git a/backend/tauri/templates/nightly.wxs b/backend/tauri/templates/nightly.wxs new file mode 100644 index 0000000000..03b578f454 --- /dev/null +++ b/backend/tauri/templates/nightly.wxs @@ -0,0 +1,311 @@ + + + + + + + + + + + + + + + + + + + + {{#if allow_downgrades}} + + {{else}} + + {{/if}} + + + Installed AND NOT UPGRADINGPRODUCTCODE + + + + + {{#if banner_path}} + + {{/if}} + {{#if dialog_image_path}} + + {{/if}} + {{#if license}} + + {{/if}} + + + + + + + + + + + + + + + + + + + + WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed + + + + {{#unless license}} + + 1 + 1 + {{/unless}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{#each binaries as |bin| ~}} + + + + {{/each~}} + {{#if enable_elevated_update_task}} + + + + + + + + + + {{/if}} + {{resources}} + + + + + + + + + + + + + + + + + + + + + {{#each merge_modules as |msm| ~}} + + + + + + + + {{/each~}} + + + + + + {{#each resource_file_ids as |resource_file_id| ~}} + + {{/each~}} + + {{#if enable_elevated_update_task}} + + + + {{/if}} + + + + + + + + + + + {{#each binaries as |bin| ~}} + + {{/each~}} + + + + + {{#each component_group_refs as |id| ~}} + + {{/each~}} + {{#each component_refs as |id| ~}} + + {{/each~}} + {{#each feature_group_refs as |id| ~}} + + {{/each~}} + {{#each feature_refs as |id| ~}} + + {{/each~}} + {{#each merge_refs as |id| ~}} + + {{/each~}} + + + {{#if install_webview}} + + + + + + + {{#if download_bootstrapper}} + + + + + + + {{/if}} + + + {{#if webview2_bootstrapper_path}} + + + + + + + + {{/if}} + + + {{#if webview2_installer_path}} + + + + + + + + {{/if}} + + {{/if}} + + {{#if enable_elevated_update_task}} + + + + + NOT(REMOVE) + + + + + + + (REMOVE = "ALL") AND NOT UPGRADINGPRODUCTCODE + + + {{/if}} + + + + diff --git a/scripts/prepare-nightly.ts b/scripts/prepare-nightly.ts index 80044db314..6f23695190 100644 --- a/scripts/prepare-nightly.ts +++ b/scripts/prepare-nightly.ts @@ -1,18 +1,39 @@ import { execSync } from "child_process"; import fs from "fs-extra"; +import { merge } from "lodash-es"; import path from "node:path"; import { TAURI_APP_DIR, cwd } from "./utils/env"; import { consola } from "./utils/logger"; - const TAURI_DEV_APP_CONF_PATH = path.join( TAURI_APP_DIR, "tauri.nightly.conf.json", ); +const TAURI_APP_CONF = path.join(TAURI_APP_DIR, "tauri.conf.json"); +const TAURI_DEV_APP_OVERRIDES_PATH = path.join( + TAURI_APP_DIR, + "overrides/nightly.conf.json", +); const PACKAGE_JSON_PATH = path.join(cwd, "package.json"); +// blocked by https://github.com/tauri-apps/tauri/issues/8447 +// const WXS_PATH = path.join(TAURI_APP_DIR, "templates", "nightly.wxs"); + +const isNSIS = process.argv.includes("--nsis"); // only build nsis +const isMSI = process.argv.includes("--msi"); // only build msi async function main() { - const tauriConf = await fs.readJSON(TAURI_DEV_APP_CONF_PATH); + consola.debug("Read config..."); + const tauriAppConf = await fs.readJSON(TAURI_APP_CONF); + const tauriAppOverrides = await fs.readJSON(TAURI_DEV_APP_OVERRIDES_PATH); + const tauriConf = merge(tauriAppConf, tauriAppOverrides); const packageJson = await fs.readJSON(PACKAGE_JSON_PATH); + // const wxsFile = await fs.readFile(WXS_PATH, "utf-8"); + + if (isNSIS) { + tauriConf.tauri.bundle.targets = ["nsis", "updater"]; + } else if (isMSI) { + tauriConf.tauri.bundle.targets = ["msi", "updater"]; + } + consola.debug("Get current git short hash"); const GIT_SHORT_HASH = execSync("git rev-parse --short HEAD") .toString() @@ -20,12 +41,21 @@ async function main() { consola.debug(`Current git short hash: ${GIT_SHORT_HASH}`); const version = `${tauriConf.package.version}-alpha+${GIT_SHORT_HASH}`; - // 1. update tauri version + // blocked by https://github.com/tauri-apps/tauri/issues/8447 + // 1. update wxs version + // consola.debug("Write raw version to wxs"); + // const modifiedWxsFile = wxsFile.replace( + // "{{version}}", + // tauriConf.package.version, + // ); + // await fs.writeFile(WXS_PATH, modifiedWxsFile); + // consola.debug("wxs updated"); + // 2. update tauri version consola.debug("Write tauri version to tauri.nightly.conf.json"); - tauriConf.package.version = version; + if (!isNSIS && !isMSI) tauriConf.package.version = version; await fs.writeJSON(TAURI_DEV_APP_CONF_PATH, tauriConf, { spaces: 2 }); consola.debug("tauri.nightly.conf.json updated"); - // 2. update package version + // 3. update package version consola.debug("Write tauri version to package.json"); packageJson.version = version; await fs.writeJSON(PACKAGE_JSON_PATH, packageJson, { spaces: 2 }); diff --git a/scripts/publish.ts b/scripts/publish.ts index 07970abfe5..5a227e2c29 100644 --- a/scripts/publish.ts +++ b/scripts/publish.ts @@ -9,7 +9,7 @@ import { consola } from "./utils/logger"; const TAURI_APP_CONF_PATH = path.join(TAURI_APP_DIR, "tauri.conf.json"); const TAURI_NIGHTLY_APP_CONF_PATH = path.join( TAURI_APP_DIR, - "tauri.nightly.conf.json", + "overrides/nightly.conf.json", ); const PACKAGE_JSON_PATH = path.join(cwd, "package.json"); diff --git a/scripts/updater-nightly.ts b/scripts/updater-nightly.ts index 97642a3142..0ba8007329 100644 --- a/scripts/updater-nightly.ts +++ b/scripts/updater-nightly.ts @@ -1,7 +1,8 @@ import { context, getOctokit } from "@actions/github"; import { execSync } from "child_process"; +import { camelCase, upperFirst } from "lodash-es"; import fetch from "node-fetch"; -import tauriNightly from "../backend/tauri/tauri.nightly.conf.json"; +import tauriNightly from "../backend/tauri/overrides/nightly.conf.json"; import { getGithubUrl } from "./utils"; import { consola } from "./utils/logger"; const UPDATE_TAG_NAME = "updater"; @@ -14,9 +15,14 @@ async function resolveUpdater() { if (process.env.GITHUB_TOKEN === undefined) { throw new Error("GITHUB_TOKEN is required"); } - - const options = { owner: context.repo.owner, repo: context.repo.repo }; + consola.start("start to generate updater files"); + const options = { + owner: context.repo.owner, + repo: context.repo.repo, + }; const github = getOctokit(process.env.GITHUB_TOKEN); + + consola.debug("resolve latest pre-release files..."); // latest pre-release tag const { data: latestPreRelease } = await github.rest.repos.getReleaseByTag({ ...options, @@ -24,7 +30,11 @@ async function resolveUpdater() { }); const shortHash = await execSync( `git rev-parse --short ${latestPreRelease.target_commitish}`, - ); + ) + .toString() + .replace("\n", "") + .replace("\r", ""); + consola.info(`latest pre-release short hash: ${shortHash}`); const updateData = { name: `v${tauriNightly.package.version}-alpha+${shortHash}`, notes: "Nightly build. Full changes see commit history.", @@ -96,6 +106,7 @@ async function resolveUpdater() { await Promise.allSettled(promises); consola.info(updateData); + consola.debug("generate updater metadata..."); // maybe should test the signature as well // delete the null field Object.entries(updateData.platforms).forEach(([key, value]) => { @@ -120,10 +131,26 @@ async function resolveUpdater() { }); // update the update.json - const { data: updateRelease } = await github.rest.repos.getReleaseByTag({ - ...options, - tag: UPDATE_TAG_NAME, - }); + consola.debug("update updater files..."); + let updateRelease; + try { + const { data } = await github.rest.repos.getReleaseByTag({ + ...options, + tag: UPDATE_TAG_NAME, + }); + updateRelease = data; + } catch (err) { + consola.error(err); + consola.error("failed to get release by tag, create one"); + const { data } = await github.rest.repos.createRelease({ + ...options, + tag_name: UPDATE_TAG_NAME, + name: upperFirst(camelCase(UPDATE_TAG_NAME)), + body: "files for programs to check for updates", + prerelease: true, + }); + updateRelease = data; + } // delete the old assets for (const asset of updateRelease.assets) { @@ -157,6 +184,7 @@ async function resolveUpdater() { name: UPDATE_JSON_PROXY, data: JSON.stringify(updateDataNew, null, 2), }); + consola.success("updater files updated"); } // get the signature file content From 27920de55ac2dedc58411b910327f81e4aea2543 Mon Sep 17 00:00:00 2001 From: Jonson Petard <41122242+greenhat616@users.noreply.github.com> Date: Fri, 22 Dec 2023 09:40:06 +0800 Subject: [PATCH 2/2] fix(ci): release build --- .github/workflows/dev.yaml | 6 +++--- .github/workflows/release.yml | 7 +++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/dev.yaml b/.github/workflows/dev.yaml index 3ed9312df8..8b74b09c99 100644 --- a/.github/workflows/dev.yaml +++ b/.github/workflows/dev.yaml @@ -28,7 +28,7 @@ jobs: category: aarch64 runs-on: ${{ matrix.targets.os }} - # if: startsWith(github.repository, 'keiko233') + if: startsWith(github.repository, 'keiko233') steps: - name: Checkout repository uses: actions/checkout@v4 @@ -150,7 +150,7 @@ jobs: name: Update tag runs-on: ubuntu-latest needs: [release] - # if: startsWith(github.repository, 'keiko233') + if: startsWith(github.repository, 'keiko233') steps: - name: Checkout repository uses: actions/checkout@v4 @@ -188,7 +188,7 @@ jobs: name: Update Nightly Updater runs-on: ubuntu-latest needs: [release, update_tag] - # if: startsWith(github.repository, 'keiko233') + if: startsWith(github.repository, 'keiko233') steps: - name: Checkout repository uses: actions/checkout@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 664d5d7e30..d02e526e7e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,7 @@ jobs: release: strategy: matrix: - os: [windows-latest, ubuntu-latest, macos-latest] + os: [windows-latest, ubuntu-latest, macos-13] runs-on: ${{ matrix.os }} if: startsWith(github.repository, 'keiko233') @@ -52,7 +52,10 @@ jobs: run: | sudo apt-get update sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf openssl - + - uses: maxim-lobanov/setup-xcode@v1 + if: startsWith(matrix.os, 'macos-') + with: + xcode-version: "15.0" - name: Pnpm install and check run: | pnpm i