Update On Fri Aug 30 20:33:09 CEST 2024

This commit is contained in:
github-action[bot]
2024-08-30 20:33:10 +02:00
parent 891d5cb988
commit ce38859597
466 changed files with 36527 additions and 9373 deletions

View File

@@ -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:

View File

@@ -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

View File

@@ -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

View File

@@ -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 }}

View File

@@ -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"

View File

@@ -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 }}

View 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