mirror of
https://github.com/bolucat/Archive.git
synced 2025-12-24 13:28:37 +08:00
Update On Fri Aug 30 20:33:09 CEST 2024
This commit is contained in:
@@ -80,6 +80,7 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
||||
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
||||
NIGHTLY: ${{ inputs.nightly == true && 'true' || 'false' }}
|
||||
with:
|
||||
tagName: ${{ inputs.tag }}
|
||||
releaseName: "Clash Nyanpasu Dev"
|
||||
@@ -87,7 +88,7 @@ jobs:
|
||||
releaseDraft: false
|
||||
prerelease: true
|
||||
tauriScript: pnpm tauri
|
||||
args: -f nightly -c ./backend/tauri/tauri.nightly.conf.json
|
||||
args: ${{ inputs.nightly == true && '-f nightly -c ./backend/tauri/tauri.nightly.conf.json' || '-f default-meta -c ./backend/tauri/tauri.conf.json' }}
|
||||
|
||||
- name: Calc the archive signature
|
||||
env:
|
||||
|
||||
@@ -109,6 +109,7 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
||||
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
||||
NIGHTLY: ${{ inputs.nightly == true && 'true' || 'false' }}
|
||||
with:
|
||||
tagName: ${{ inputs.tag }}
|
||||
releaseName: "Clash Nyanpasu Dev"
|
||||
@@ -116,7 +117,7 @@ jobs:
|
||||
releaseDraft: false
|
||||
prerelease: true
|
||||
tauriScript: pnpm tauri
|
||||
args: -f nightly -c ./backend/tauri/tauri.nightly.conf.json
|
||||
args: ${{ inputs.nightly == true && '-f nightly -c ./backend/tauri/tauri.nightly.conf.json' || '-f default-meta -c ./backend/tauri/tauri.conf.json' }}
|
||||
|
||||
- name: Tauri build with Upload (macOS aarch64)
|
||||
if: ${{ inputs.aarch64 == true }}
|
||||
@@ -125,6 +126,7 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
||||
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
||||
NIGHTLY: ${{ inputs.nightly == true && 'true' || 'false' }}
|
||||
run: |
|
||||
pnpm build:nightly --target aarch64-apple-darwin
|
||||
${{ inputs.nightly == true && 'pnpm build:nightly --target aarch64-apple-darwin' || 'pnpm build --target aarch64-apple-darwin' }}
|
||||
pnpm upload:osx-aarch64
|
||||
|
||||
@@ -74,10 +74,9 @@ jobs:
|
||||
pnpm i
|
||||
pnpm check
|
||||
|
||||
- name: Nightly Prepare (Windows NSIS and Portable)
|
||||
if: ${{ inputs.nightly == true }}
|
||||
run: |
|
||||
pnpm prepare:nightly --nsis
|
||||
- name: Prepare (Windows NSIS and Portable)
|
||||
run: ${{ inputs.nightly == true && 'pnpm prepare:nightly --nsis' || 'pnpm prepare:release --nsis' }}
|
||||
|
||||
- name: Build UI
|
||||
run: |
|
||||
pnpm -F ui build
|
||||
@@ -88,6 +87,7 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
||||
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
||||
NIGHTLY: ${{ inputs.nightly == true && 'true' || 'false' }}
|
||||
with:
|
||||
tagName: ${{ inputs.tag }}
|
||||
releaseName: "Clash Nyanpasu Dev"
|
||||
@@ -95,7 +95,7 @@ jobs:
|
||||
releaseDraft: false
|
||||
prerelease: true
|
||||
tauriScript: pnpm tauri
|
||||
args: -f nightly -c ./backend/tauri/tauri.nightly.conf.json
|
||||
args: ${{ inputs.nightly == true && '-f nightly -c ./backend/tauri/tauri.nightly.conf.json' || '-f default-meta -c ./backend/tauri/tauri.conf.json' }}
|
||||
|
||||
- name: Portable Bundle
|
||||
if: ${{ inputs.portable == true }}
|
||||
@@ -106,4 +106,5 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
||||
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
||||
NIGHTLY: ${{ inputs.nightly == true && 'true' || 'false' }}
|
||||
VITE_WIN_PORTABLE: 1
|
||||
|
||||
@@ -8,7 +8,10 @@ on:
|
||||
required: true
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
release_body:
|
||||
description: "Release Body"
|
||||
required: false
|
||||
type: string
|
||||
workflow_call:
|
||||
inputs:
|
||||
nightly:
|
||||
@@ -16,17 +19,23 @@ on:
|
||||
required: true
|
||||
type: boolean
|
||||
default: false
|
||||
release_body:
|
||||
description: "Release Body"
|
||||
required: false
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
updater:
|
||||
name: Update Nightly Updater
|
||||
name: Update Updater
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-tags: true # Fetch all tags
|
||||
|
||||
ref: ${{ github.ref }}
|
||||
# blocked by https://github.com/actions/checkout/issues/1467
|
||||
- name: Fetch git tags
|
||||
run: git fetch --tags
|
||||
- name: Install Node latest
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
@@ -40,15 +49,15 @@ jobs:
|
||||
- name: Pnpm install
|
||||
run: pnpm i
|
||||
|
||||
- name: Update Updater
|
||||
- name: Update Nightly Updater
|
||||
if: ${{ inputs.nightly == true }}
|
||||
run: pnpm updater:nightly
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Release updater file
|
||||
- name: Update Stable Updater
|
||||
if: ${{ inputs.nightly == false }}
|
||||
run: pnpm updater
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
RELEASE_BODY: ${{ github.event.release.body }}
|
||||
RELEASE_BODY: ${{ inputs.release_body || github.event.release.body }}
|
||||
|
||||
2
clash-nyanpasu/.github/workflows/publish.yml
vendored
2
clash-nyanpasu/.github/workflows/publish.yml
vendored
@@ -66,7 +66,7 @@ jobs:
|
||||
git-cliff --config cliff.toml --verbose --strip header --unreleased --tag v${{ steps.update-version.outputs.version }} > /tmp/changelog.md
|
||||
if [ $? -eq 0 ]; then
|
||||
CONTENT=$(cat /tmp/changelog.md)
|
||||
cat /tmp/changelog.md >> ./CHANGELOG.md
|
||||
cat /tmp/changelog.md | cat - ./CHANGELOG.md > temp && mv temp ./CHANGELOG.md
|
||||
{
|
||||
echo 'content<<EOF'
|
||||
echo "$CONTENT"
|
||||
|
||||
185
clash-nyanpasu/.github/workflows/release.yml
vendored
185
clash-nyanpasu/.github/workflows/release.yml
vendored
@@ -1,185 +0,0 @@
|
||||
name: Release Build
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
env:
|
||||
CARGO_INCREMENTAL: 0
|
||||
RUST_BACKTRACE: short
|
||||
|
||||
jobs:
|
||||
release:
|
||||
strategy:
|
||||
matrix:
|
||||
targets:
|
||||
- os: windows-latest
|
||||
category: all
|
||||
- os: ubuntu-latest
|
||||
category: all
|
||||
- os: macos-13
|
||||
category: amd64
|
||||
- os: macos-13
|
||||
category: aarch64
|
||||
|
||||
runs-on: ${{ matrix.targets.os }}
|
||||
if: startsWith(github.repository, 'LibNyanpasu')
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: install Rust stable
|
||||
run: |
|
||||
rustup install stable --profile minimal --no-self-update
|
||||
rustup default stable
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
workspaces: "./backend/"
|
||||
prefix-key: "rust-stable"
|
||||
key: ${{ matrix.targets.os }}
|
||||
shared-key: "release"
|
||||
|
||||
- name: Install the missing rust target (macOS Only)
|
||||
if: startsWith(matrix.targets.os, 'macos-')
|
||||
run: |
|
||||
rustup target add aarch64-apple-darwin
|
||||
|
||||
- name: Install Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "20"
|
||||
|
||||
- uses: pnpm/action-setup@v4
|
||||
name: Install pnpm
|
||||
with:
|
||||
run_install: false
|
||||
|
||||
- name: Delete current release assets
|
||||
if: startsWith(matrix.targets.os, 'ubuntu-')
|
||||
uses: mknejp/delete-release-assets@v1
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
tag: ${{ github.event.release.tag_name }}
|
||||
fail-if-no-assets: false
|
||||
fail-if-no-release: false
|
||||
assets: |
|
||||
*.zip
|
||||
*.gz
|
||||
*.AppImage
|
||||
*.deb
|
||||
*.dmg
|
||||
*.msi
|
||||
*.sig
|
||||
*.exe
|
||||
*.json
|
||||
|
||||
- name: Install Dependencies (Ubuntu Only)
|
||||
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
|
||||
|
||||
- name: Prepare Tauri manifest (nsis)
|
||||
if: startsWith(matrix.targets.os, 'windows-')
|
||||
run: |
|
||||
pnpm prepare:release --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.GITHUB_TOKEN }}
|
||||
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
||||
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
||||
with:
|
||||
releaseId: ${{ github.event.release.id }}
|
||||
# tagName: ${{ github.event.release.tag_name }}
|
||||
# releaseName: "Clash Nyanpasu ${{ github.event.release.tag_name }}"
|
||||
# releaseBody: "More new features are now supported."
|
||||
# releaseDraft: false
|
||||
# prerelease: false
|
||||
tauriScript: pnpm tauri
|
||||
args: -f default-meta -c ./backend/tauri/tauri.conf.json
|
||||
|
||||
- name: Portable Bundle (Windows Only)
|
||||
if: startsWith(matrix.targets.os, 'windows-')
|
||||
run: |
|
||||
pnpm portable
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
||||
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
||||
VITE_WIN_PORTABLE: 1
|
||||
|
||||
- name: Pnpm check (macOS aarch64)
|
||||
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.targets.os, 'macos-') && matrix.targets.category == 'aarch64'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
||||
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
||||
run: |
|
||||
pnpm build --target aarch64-apple-darwin
|
||||
pnpm upload:osx-aarch64
|
||||
|
||||
release-update:
|
||||
needs: release
|
||||
runs-on: ubuntu-latest
|
||||
if: |
|
||||
startsWith(github.repository, 'LibNyanpasu')
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "20"
|
||||
|
||||
- uses: pnpm/action-setup@v4
|
||||
name: Install pnpm
|
||||
with:
|
||||
run_install: false
|
||||
|
||||
- name: Pnpm install
|
||||
run: pnpm i
|
||||
|
||||
- name: Release updater file
|
||||
run: pnpm updater
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
RELEASE_BODY: ${{ github.event.release.body }}
|
||||
|
||||
- name: Send Telegram Channel Notify
|
||||
run: pnpm send-notify
|
||||
env:
|
||||
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
|
||||
TELEGRAM_TO: "@keikolog"
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Post Tweet
|
||||
uses: rg-wood/send-tweet-action@v1
|
||||
with:
|
||||
status: |
|
||||
Clash Nyanpasu ${{ github.event.release.tag_name }} Released!
|
||||
|
||||
Download Link: https://github.com/LibNyanpasu/clash-nyanpasu/releases/tag/v${{ github.event.release.tag_name }}
|
||||
consumer-key: ${{ secrets.TWITTER_CONSUMER_KEY }}
|
||||
consumer-secret: ${{ secrets.TWITTER_CONSUMER_SECRET }}
|
||||
access-token: ${{ secrets.TWITTER_ACCESS_TOKEN }}
|
||||
access-token-secret: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
|
||||
61
clash-nyanpasu/.github/workflows/target-release-build.yaml
vendored
Normal file
61
clash-nyanpasu/.github/workflows/target-release-build.yaml
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
name: "[Entire] Build Release Version"
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
env:
|
||||
CARGO_INCREMENTAL: 0
|
||||
RUST_BACKTRACE: short
|
||||
|
||||
jobs:
|
||||
windows_build:
|
||||
name: Windows Build
|
||||
uses: ./.github/workflows/deps-build-windows-nsis.yaml
|
||||
with:
|
||||
portable: true
|
||||
nightly: false
|
||||
tag: ${{ github.event.release.tag_name }}
|
||||
secrets: inherit
|
||||
|
||||
linux_build:
|
||||
name: Linux Build
|
||||
uses: ./.github/workflows/deps-build-linux.yaml
|
||||
with:
|
||||
nightly: false
|
||||
tag: ${{ github.event.release.tag_name }}
|
||||
secrets: inherit
|
||||
|
||||
macos_amd64_build:
|
||||
name: macOS amd64 Build
|
||||
uses: ./.github/workflows/deps-build-macos.yaml
|
||||
with:
|
||||
nightly: false
|
||||
aarch64: false
|
||||
tag: ${{ github.event.release.tag_name }}
|
||||
secrets: inherit
|
||||
|
||||
macos_aarch64_build:
|
||||
name: macOS aarch64 Build
|
||||
uses: ./.github/workflows/deps-build-macos.yaml
|
||||
with:
|
||||
nightly: false
|
||||
aarch64: true
|
||||
tag: ${{ github.event.release.tag_name }}
|
||||
secrets: inherit
|
||||
|
||||
updater:
|
||||
name: Create Updater
|
||||
uses: ./.github/workflows/deps-create-updater.yaml
|
||||
needs: [windows_build, linux_build, macos_amd64_build, macos_aarch64_build]
|
||||
with:
|
||||
nightly: false
|
||||
|
||||
telegram:
|
||||
name: Send Release Message to Telegram
|
||||
if: startsWith(github.repository, 'LibNyanpasu')
|
||||
needs: [windows_build, linux_build, macos_amd64_build, macos_aarch64_build]
|
||||
uses: ./.github/workflows/deps-message-telegram.yaml
|
||||
with:
|
||||
nightly: false
|
||||
secrets: inherit
|
||||
Reference in New Issue
Block a user