Улучшен CI/CD

This commit is contained in:
RoyceDa
2026-03-22 16:08:24 +02:00
parent 329e6d7825
commit b300fa4d03
4 changed files with 80 additions and 125 deletions

View File

@@ -12,7 +12,11 @@ on:
jobs:
build:
runs-on: linux
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
arch: [x64, arm64]
steps:
- name: Checkout code
uses: actions/checkout@v6
@@ -49,38 +53,28 @@ jobs:
- name: Install npm dependencies
run: npm install --no-audit --no-fund
- name: Build the application
run: npm run kernel:linux
- name: Build the application (${{ matrix.arch }})
run: |
npx electron-vite build
npx electron-builder --linux --${{ matrix.arch }}
- name: Check if files exist
- name: Check if files exist (${{ matrix.arch }})
run: |
echo "=== Checking dist structure ==="
find dist/builds -type f -name "*.AppImage" 2>/dev/null || echo "No AppImage files found"
ls -la dist/builds/linux/ 2>/dev/null || echo "linux folder not found"
find dist/builds/linux/${{ matrix.arch }} -type f -name "*.AppImage" 2>/dev/null || echo "No AppImage files found"
ls -la dist/builds/linux/${{ matrix.arch }}/ 2>/dev/null || echo "arch folder not found"
- name: Install SCP in Docker container
run: apt-get install -y openssh-client
- name: Upload x64 to SSH using SCP
- name: Upload ${{ matrix.arch }} to SSH using SCP
uses: appleboy/scp-action@master
with:
host: ${{ secrets.SDU_SSH_HOST }}
username: ${{ secrets.SDU_SSH_USERNAME }}
password: ${{ secrets.SDU_SSH_PASSWORD }}
port: 22
source: "dist/builds/linux/x64/Rosetta-*.AppImage"
target: "${{ secrets.SDU_SSH_KERNEL }}/linux/x64"
source: "dist/builds/linux/${{ matrix.arch }}/Rosetta-*.AppImage"
target: "${{ secrets.SDU_SSH_KERNEL }}/linux/${{ matrix.arch }}"
strip_components: 4
rm: true
- name: Upload arm64 to SSH using SCP
uses: appleboy/scp-action@master
with:
host: ${{ secrets.SDU_SSH_HOST }}
username: ${{ secrets.SDU_SSH_USERNAME }}
password: ${{ secrets.SDU_SSH_PASSWORD }}
port: 22
source: "dist/builds/linux/arm64/Rosetta-*.AppImage"
target: "${{ secrets.SDU_SSH_KERNEL }}/linux/arm64"
strip_components: 4
rm: true
rm: true