mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2026-02-11 04:00:32 +08:00
ci: upgrade github actions to latest versions
This commit is contained in:
parent
818b546817
commit
a4ab3cb448
80
.github/workflows/build.yml
vendored
80
.github/workflows/build.yml
vendored
@ -26,7 +26,7 @@ jobs:
|
|||||||
jq -r '.id // empty')
|
jq -r '.id // empty')
|
||||||
|
|
||||||
if [ ! -z "$RELEASE_ID" ] && [ "$RELEASE_ID" != "empty" ]; then
|
if [ ! -z "$RELEASE_ID" ] && [ "$RELEASE_ID" != "empty" ]; then
|
||||||
echo "✅ Found dev release with ID: $RELEASE_ID"
|
echo "�Found dev release with ID: $RELEASE_ID"
|
||||||
|
|
||||||
echo "📋 Getting list of assets with pagination..."
|
echo "📋 Getting list of assets with pagination..."
|
||||||
ALL_ASSETS="[]"
|
ALL_ASSETS="[]"
|
||||||
@ -63,16 +63,16 @@ jobs:
|
|||||||
# Delete each asset with detailed logging
|
# Delete each asset with detailed logging
|
||||||
echo "$ALL_ASSETS" | jq -r '.[].id' | while read asset_id; do
|
echo "$ALL_ASSETS" | jq -r '.[].id' | while read asset_id; do
|
||||||
if [ ! -z "$asset_id" ]; then
|
if [ ! -z "$asset_id" ]; then
|
||||||
echo "🗑️ Deleting asset ID: $asset_id"
|
echo "🗑� Deleting asset ID: $asset_id"
|
||||||
RESPONSE=$(curl -s -w "HTTPSTATUS:%{http_code}" -X DELETE \
|
RESPONSE=$(curl -s -w "HTTPSTATUS:%{http_code}" -X DELETE \
|
||||||
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
|
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
|
||||||
"https://api.github.com/repos/${{ github.repository }}/releases/assets/$asset_id")
|
"https://api.github.com/repos/${{ github.repository }}/releases/assets/$asset_id")
|
||||||
|
|
||||||
HTTP_CODE=$(echo $RESPONSE | tr -d '\n' | sed -e 's/.*HTTPSTATUS://')
|
HTTP_CODE=$(echo $RESPONSE | tr -d '\n' | sed -e 's/.*HTTPSTATUS://')
|
||||||
if [ "$HTTP_CODE" = "204" ]; then
|
if [ "$HTTP_CODE" = "204" ]; then
|
||||||
echo "✅ Successfully deleted asset $asset_id"
|
echo "�Successfully deleted asset $asset_id"
|
||||||
else
|
else
|
||||||
echo "❌ Failed to delete asset $asset_id (HTTP: $HTTP_CODE)"
|
echo "â<EFBFBD>?Failed to delete asset $asset_id (HTTP: $HTTP_CODE)"
|
||||||
echo "Response: $(echo $RESPONSE | sed -e 's/HTTPSTATUS:.*//')"
|
echo "Response: $(echo $RESPONSE | sed -e 's/HTTPSTATUS:.*//')"
|
||||||
fi
|
fi
|
||||||
# Add small delay to avoid rate limiting
|
# Add small delay to avoid rate limiting
|
||||||
@ -102,9 +102,14 @@ jobs:
|
|||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
- name: Setup pnpm
|
- name: Setup pnpm
|
||||||
run: npm install -g pnpm
|
uses: pnpm/action-setup@v4
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v6
|
||||||
|
with:
|
||||||
|
node-version: 22
|
||||||
|
cache: 'pnpm'
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
env:
|
env:
|
||||||
npm_config_arch: ${{ matrix.arch }}
|
npm_config_arch: ${{ matrix.arch }}
|
||||||
@ -136,7 +141,7 @@ jobs:
|
|||||||
run: pnpm copy-legacy
|
run: pnpm copy-legacy
|
||||||
- name: Upload Artifacts
|
- name: Upload Artifacts
|
||||||
if: startsWith(github.ref, 'refs/heads/')
|
if: startsWith(github.ref, 'refs/heads/')
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v6
|
||||||
with:
|
with:
|
||||||
name: Windows ${{ matrix.arch }}
|
name: Windows ${{ matrix.arch }}
|
||||||
path: |
|
path: |
|
||||||
@ -178,9 +183,14 @@ jobs:
|
|||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
- name: Setup pnpm
|
- name: Setup pnpm
|
||||||
run: npm install -g pnpm
|
uses: pnpm/action-setup@v4
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v6
|
||||||
|
with:
|
||||||
|
node-version: 22
|
||||||
|
cache: 'pnpm'
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
env:
|
env:
|
||||||
npm_config_arch: ${{ matrix.arch }}
|
npm_config_arch: ${{ matrix.arch }}
|
||||||
@ -214,7 +224,7 @@ jobs:
|
|||||||
run: pnpm copy-legacy
|
run: pnpm copy-legacy
|
||||||
- name: Upload Artifacts
|
- name: Upload Artifacts
|
||||||
if: startsWith(github.ref, 'refs/heads/')
|
if: startsWith(github.ref, 'refs/heads/')
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v6
|
||||||
with:
|
with:
|
||||||
name: Win7 ${{ matrix.arch }}
|
name: Win7 ${{ matrix.arch }}
|
||||||
path: |
|
path: |
|
||||||
@ -256,9 +266,14 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
- name: Setup pnpm
|
- name: Setup pnpm
|
||||||
run: npm install -g pnpm
|
uses: pnpm/action-setup@v4
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v6
|
||||||
|
with:
|
||||||
|
node-version: 22
|
||||||
|
cache: 'pnpm'
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
env:
|
env:
|
||||||
npm_config_arch: ${{ matrix.arch }}
|
npm_config_arch: ${{ matrix.arch }}
|
||||||
@ -285,7 +300,7 @@ jobs:
|
|||||||
run: pnpm copy-legacy
|
run: pnpm copy-legacy
|
||||||
- name: Upload Artifacts
|
- name: Upload Artifacts
|
||||||
if: startsWith(github.ref, 'refs/heads/')
|
if: startsWith(github.ref, 'refs/heads/')
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v6
|
||||||
with:
|
with:
|
||||||
name: Linux ${{ matrix.arch }}
|
name: Linux ${{ matrix.arch }}
|
||||||
path: |
|
path: |
|
||||||
@ -327,9 +342,14 @@ jobs:
|
|||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
- name: Setup pnpm
|
- name: Setup pnpm
|
||||||
run: npm install -g pnpm
|
uses: pnpm/action-setup@v4
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v6
|
||||||
|
with:
|
||||||
|
node-version: 22
|
||||||
|
cache: 'pnpm'
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
env:
|
env:
|
||||||
npm_config_arch: ${{ matrix.arch }}
|
npm_config_arch: ${{ matrix.arch }}
|
||||||
@ -357,7 +377,7 @@ jobs:
|
|||||||
chmod +x build/pkg-scripts/postinstall build/pkg-scripts/preinstall
|
chmod +x build/pkg-scripts/postinstall build/pkg-scripts/preinstall
|
||||||
pnpm build:mac --${{ matrix.arch }}
|
pnpm build:mac --${{ matrix.arch }}
|
||||||
- name: Setup temporary installer signing keychain
|
- name: Setup temporary installer signing keychain
|
||||||
uses: apple-actions/import-codesign-certs@v3
|
uses: apple-actions/import-codesign-certs@v6
|
||||||
with:
|
with:
|
||||||
p12-file-base64: ${{ secrets.CSC_INSTALLER_LINK }}
|
p12-file-base64: ${{ secrets.CSC_INSTALLER_LINK }}
|
||||||
p12-password: ${{ secrets.CSC_INSTALLER_KEY_PASSWORD }}
|
p12-password: ${{ secrets.CSC_INSTALLER_KEY_PASSWORD }}
|
||||||
@ -381,7 +401,7 @@ jobs:
|
|||||||
run: pnpm copy-legacy
|
run: pnpm copy-legacy
|
||||||
- name: Upload Artifacts
|
- name: Upload Artifacts
|
||||||
if: startsWith(github.ref, 'refs/heads/')
|
if: startsWith(github.ref, 'refs/heads/')
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v6
|
||||||
with:
|
with:
|
||||||
name: MacOS ${{ matrix.arch }}
|
name: MacOS ${{ matrix.arch }}
|
||||||
path: |
|
path: |
|
||||||
@ -420,9 +440,14 @@ jobs:
|
|||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
- name: Setup pnpm
|
- name: Setup pnpm
|
||||||
run: npm install -g pnpm
|
uses: pnpm/action-setup@v4
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v6
|
||||||
|
with:
|
||||||
|
node-version: 22
|
||||||
|
cache: 'pnpm'
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
env:
|
env:
|
||||||
npm_config_arch: ${{ matrix.arch }}
|
npm_config_arch: ${{ matrix.arch }}
|
||||||
@ -452,7 +477,7 @@ jobs:
|
|||||||
chmod +x build/pkg-scripts/postinstall build/pkg-scripts/preinstall
|
chmod +x build/pkg-scripts/postinstall build/pkg-scripts/preinstall
|
||||||
pnpm build:mac --${{ matrix.arch }}
|
pnpm build:mac --${{ matrix.arch }}
|
||||||
- name: Setup temporary installer signing keychain
|
- name: Setup temporary installer signing keychain
|
||||||
uses: apple-actions/import-codesign-certs@v3
|
uses: apple-actions/import-codesign-certs@v6
|
||||||
with:
|
with:
|
||||||
p12-file-base64: ${{ secrets.CSC_INSTALLER_LINK }}
|
p12-file-base64: ${{ secrets.CSC_INSTALLER_LINK }}
|
||||||
p12-password: ${{ secrets.CSC_INSTALLER_KEY_PASSWORD }}
|
p12-password: ${{ secrets.CSC_INSTALLER_KEY_PASSWORD }}
|
||||||
@ -476,7 +501,7 @@ jobs:
|
|||||||
run: pnpm copy-legacy
|
run: pnpm copy-legacy
|
||||||
- name: Upload Artifacts
|
- name: Upload Artifacts
|
||||||
if: startsWith(github.ref, 'refs/heads/')
|
if: startsWith(github.ref, 'refs/heads/')
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v6
|
||||||
with:
|
with:
|
||||||
name: Catalina ${{ matrix.arch }}
|
name: Catalina ${{ matrix.arch }}
|
||||||
path: |
|
path: |
|
||||||
@ -509,9 +534,14 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
- name: Setup pnpm
|
- name: Setup pnpm
|
||||||
run: npm install -g pnpm
|
uses: pnpm/action-setup@v4
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v6
|
||||||
|
with:
|
||||||
|
node-version: 22
|
||||||
|
cache: 'pnpm'
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: pnpm install
|
run: pnpm install
|
||||||
- name: Update Version for Dev Build
|
- name: Update Version for Dev Build
|
||||||
@ -566,7 +596,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
- name: Update Version
|
- name: Update Version
|
||||||
run: |
|
run: |
|
||||||
sed -i "s/pkgver=.*/pkgver=$(echo ${{ github.ref }} | tr -d 'refs/tags/v')/" aur/${{ matrix.pkgname }}/PKGBUILD
|
sed -i "s/pkgver=.*/pkgver=$(echo ${{ github.ref }} | tr -d 'refs/tags/v')/" aur/${{ matrix.pkgname }}/PKGBUILD
|
||||||
@ -601,7 +631,7 @@ jobs:
|
|||||||
if: startsWith(github.ref, 'refs/heads/')
|
if: startsWith(github.ref, 'refs/heads/')
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: update version
|
- name: update version
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
"lint": "eslint . --ext .js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix",
|
"lint": "eslint . --ext .js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix",
|
||||||
"typecheck:node": "tsc --noEmit -p tsconfig.node.json --composite false",
|
"typecheck:node": "tsc --noEmit -p tsconfig.node.json --composite false",
|
||||||
"typecheck:web": "tsc --noEmit -p tsconfig.web.json --composite false",
|
"typecheck:web": "tsc --noEmit -p tsconfig.web.json --composite false",
|
||||||
"typecheck": "npm run typecheck:node && npm run typecheck:web",
|
"typecheck": "pnpm run typecheck:node && pnpm run typecheck:web",
|
||||||
"prepare": "node scripts/prepare.mjs",
|
"prepare": "node scripts/prepare.mjs",
|
||||||
"prepare:dev": "node scripts/update-version.mjs && node scripts/prepare.mjs",
|
"prepare:dev": "node scripts/update-version.mjs && node scripts/prepare.mjs",
|
||||||
"updater": "node scripts/updater.mjs",
|
"updater": "node scripts/updater.mjs",
|
||||||
@ -23,11 +23,11 @@
|
|||||||
"dev": "electron-vite dev",
|
"dev": "electron-vite dev",
|
||||||
"postinstall": "electron-builder install-app-deps && node node_modules/electron/install.js",
|
"postinstall": "electron-builder install-app-deps && node node_modules/electron/install.js",
|
||||||
"build:win": "electron-vite build && electron-builder --publish never --win",
|
"build:win": "electron-vite build && electron-builder --publish never --win",
|
||||||
"build:win:dev": "npm run prepare:dev && electron-vite build && electron-builder --publish never --win",
|
"build:win:dev": "pnpm run prepare:dev && electron-vite build && electron-builder --publish never --win",
|
||||||
"build:mac": "electron-vite build && electron-builder --publish never --mac",
|
"build:mac": "electron-vite build && electron-builder --publish never --mac",
|
||||||
"build:mac:dev": "npm run prepare:dev && electron-vite build && electron-builder --publish never --mac",
|
"build:mac:dev": "pnpm run prepare:dev && electron-vite build && electron-builder --publish never --mac",
|
||||||
"build:linux": "electron-vite build && electron-builder --publish never --linux",
|
"build:linux": "electron-vite build && electron-builder --publish never --linux",
|
||||||
"build:linux:dev": "npm run prepare:dev && electron-vite build && electron-builder --publish never --linux"
|
"build:linux:dev": "pnpm run prepare:dev && electron-vite build && electron-builder --publish never --linux"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@electron-toolkit/utils": "^4.0.0",
|
"@electron-toolkit/utils": "^4.0.0",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user