ci/cd test
This commit is contained in:
@@ -17,8 +17,6 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
arch: [x64, arm64]
|
arch: [x64, arm64]
|
||||||
env:
|
|
||||||
ARCH: ${{ matrix.arch }}
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
@@ -29,59 +27,34 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: '22'
|
node-version: '22'
|
||||||
|
|
||||||
- name: Cache npm dependencies
|
|
||||||
uses: actions/cache@v5
|
|
||||||
with:
|
|
||||||
path: ~/.npm
|
|
||||||
key: ${{ runner.os }}-linux-npm-${{ hashFiles('**/package.json') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-linux-npm-
|
|
||||||
if-no-files-found: ignore
|
|
||||||
|
|
||||||
- name: Cache electron-builder
|
|
||||||
uses: actions/cache@v5
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cache/electron
|
|
||||||
key: ${{ runner.os }}-linux-electron-builder-${{ hashFiles('**/electron-builder.yml') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-linux-electron-builder-
|
|
||||||
if-no-files-found: ignore
|
|
||||||
|
|
||||||
- name: NPM offline setup
|
|
||||||
run: |
|
|
||||||
npm config set cache ~/.npm --global
|
|
||||||
npm config set prefer-offline true --global
|
|
||||||
|
|
||||||
- name: Install npm dependencies
|
- name: Install npm dependencies
|
||||||
run: npm install --no-audit --no-fund
|
run: npm install --no-audit --no-fund
|
||||||
|
|
||||||
- name: Debug ARCH
|
- name: Debug ARCH
|
||||||
run: |
|
run: |
|
||||||
echo "matrix.arch = ${{ matrix.arch }}"
|
echo "matrix.arch = ${{ matrix.arch }}"
|
||||||
echo "ARCH = $ARCH"
|
|
||||||
|
|
||||||
- name: Build the application (${{ env.ARCH }})
|
- name: Build the application
|
||||||
run: |
|
run: |
|
||||||
mkdir -p dist/builds/linux/$ARCH
|
mkdir -p dist/builds/linux/${{ matrix.arch }}
|
||||||
mkdir -p dist/builds/linux/x86_64
|
mkdir -p dist/builds/linux/x86_64
|
||||||
npx electron-vite build
|
npx electron-vite build
|
||||||
npx electron-builder --linux --$ARCH
|
npx electron-builder --linux --${{ matrix.arch }}
|
||||||
|
|
||||||
- name: Check if files exist (${{ env.ARCH }})
|
- name: Check if files exist
|
||||||
run: |
|
run: |
|
||||||
echo "=== Checking dist structure ==="
|
echo "=== Checking dist structure ==="
|
||||||
find dist/builds/linux/$ARCH -type f -name "*.AppImage" 2>/dev/null || echo "No AppImage files found"
|
find dist/builds/linux/${{ matrix.arch }} -type f -name "*.AppImage" 2>/dev/null || echo "No AppImage files found"
|
||||||
ls -la dist/builds/linux/$ARCH/ 2>/dev/null || echo "arch folder not found"
|
ls -la dist/builds/linux/${{ matrix.arch }}/ 2>/dev/null || echo "arch folder not found"
|
||||||
|
|
||||||
- name: Upload ${{ env.ARCH }} to SSH using SCP
|
- name: Upload to SSH using SCP
|
||||||
uses: appleboy/scp-action@master
|
uses: appleboy/scp-action@master
|
||||||
with:
|
with:
|
||||||
host: ${{ secrets.SDU_SSH_HOST }}
|
host: ${{ secrets.SDU_SSH_HOST }}
|
||||||
username: ${{ secrets.SDU_SSH_USERNAME }}
|
username: ${{ secrets.SDU_SSH_USERNAME }}
|
||||||
password: ${{ secrets.SDU_SSH_PASSWORD }}
|
password: ${{ secrets.SDU_SSH_PASSWORD }}
|
||||||
port: 22
|
port: 22
|
||||||
source: dist/builds/linux/${{ env.ARCH }}/Rosetta-*.AppImage
|
source: dist/builds/linux/${{ matrix.arch }}/Rosetta-*.AppImage
|
||||||
target: ${{ secrets.SDU_SSH_KERNEL }}/linux/${{ env.ARCH }}
|
target: ${{ secrets.SDU_SSH_KERNEL }}/linux/${{ matrix.arch }}
|
||||||
strip_components: 4
|
strip_components: 4
|
||||||
rm: true
|
rm: true
|
||||||
Reference in New Issue
Block a user