try to build linux arm64

build-arm64
王良 3 weeks ago
parent e9c78eb915
commit 7c1cef78c3

@ -1,22 +1,16 @@
name: "Build And Release"
name: "BuildArm64 And Release"
on:
push:
tags:
- "*"
branches:
- build-arm64
jobs:
# job 1
build-and-upload:
runs-on: ${{ matrix.os }}-latest
buildArm64-and-upload:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [
windows,
ubuntu,
macos
]
node: [
16,
17
@ -83,7 +77,7 @@ jobs:
echo "--------------------";
lerna bootstrap --npm-client=yarn;
- name: "npm run electron:build for node16"
- name: "npm run electron:build --arm64 for node16"
if: ${{ matrix.node == '16' }}
run: |
echo "======================================================================";
@ -93,9 +87,9 @@ jobs:
dir || ls -lah;
echo "======================================================================";
echo "npm run electron:build";
echo "npm run electron:build --arm64";
echo "--------------------";
npm run electron:build;
npm run electron:build --arm64;
echo "======================================================================";
echo "cd dist_electron";
@ -109,7 +103,7 @@ jobs:
cd ../../../;
dir || ls -lah;
- name: "npm run electron:build for node17"
- name: "npm run electron:build --arm64 for node17"
if: ${{ matrix.node != '16' }}
env:
NODE_OPTIONS: --openssl-legacy-provider
@ -121,9 +115,9 @@ jobs:
dir || ls -lah;
echo "======================================================================";
echo "npm run electron:build";
echo "npm run electron:build --arm64";
echo "--------------------";
npm run electron:build;
npm run electron:build --arm64;
echo "======================================================================";
echo "cd dist_electron";
@ -137,118 +131,15 @@ jobs:
cd ../../../;
dir || ls -lah;
- name: "Upload DevSidecar-${{ steps.package-info.outputs.version }}-node${{ matrix.node }}.exe - Windows"
uses: actions/upload-artifact@v4.4.0
if: ${{ matrix.os == 'windows' }}
with:
path: packages/gui/dist_electron/DevSidecar-${{ steps.package-info.outputs.version }}.exe
name: "DevSidecar-${{ steps.package-info.outputs.version }}-node${{ matrix.node }}.exe"
if-no-files-found: error
- name: "Upload DevSidecar-${{ steps.package-info.outputs.version }}-node${{ matrix.node }}.deb - Ubuntu"
uses: actions/upload-artifact@v4.4.0
if: ${{ matrix.os == 'ubuntu' }}
with:
path: packages/gui/dist_electron/DevSidecar-${{ steps.package-info.outputs.version }}.deb
name: "DevSidecar-${{ steps.package-info.outputs.version }}-node${{ matrix.node }}.deb"
if-no-files-found: error
- name: "Upload DevSidecar-${{ steps.package-info.outputs.version }}-node${{ matrix.node }}.AppImage - Ubuntu"
uses: actions/upload-artifact@v4.4.0
if: ${{ matrix.os == 'ubuntu' }}
with:
path: packages/gui/dist_electron/DevSidecar-${{ steps.package-info.outputs.version }}.AppImage
name: "DevSidecar-${{ steps.package-info.outputs.version }}-node${{ matrix.node }}.AppImage"
if-no-files-found: error
- name: "Upload DevSidecar-${{ steps.package-info.outputs.version }}-node${{ matrix.node }}.dmg - Mac"
uses: actions/upload-artifact@v4.4.0
if: ${{ matrix.os == 'macos' }}
with:
path: packages/gui/dist_electron/DevSidecar-${{ steps.package-info.outputs.version }}.dmg
name: "DevSidecar-${{ steps.package-info.outputs.version }}-node${{ matrix.node }}.dmg"
if-no-files-found: error
# job 2
download-and-release:
runs-on: ubuntu-latest
needs:
- build-and-upload
steps:
- name: "Checkout"
uses: actions/checkout@v4.1.7
- name: "Get package info"
id: package-info
uses: luizfelipelaviola/get-package-info@v1
with:
path: ./packages/mitmproxy
- name: "Make 'release' dir"
run: mkdir release
# Download artifacts with node16
- name: "Download DevSidecar-${{ steps.package-info.outputs.version }}-node16.exe - Windows"
uses: actions/download-artifact@v4.1.8
with:
name: DevSidecar-${{ steps.package-info.outputs.version }}-node16.exe
path: release
- name: "Download DevSidecar-${{ steps.package-info.outputs.version }}-node16.deb - Ubuntu"
uses: actions/download-artifact@v4.1.8
with:
name: DevSidecar-${{ steps.package-info.outputs.version }}-node16.deb
path: release
- name: "Download DevSidecar-${{ steps.package-info.outputs.version }}-node16.AppImage - Ubuntu"
uses: actions/download-artifact@v4.1.8
with:
name: DevSidecar-${{ steps.package-info.outputs.version }}-node16.AppImage
path: release
- name: "Download DevSidecar-${{ steps.package-info.outputs.version }}-node16.dmg - Mac"
uses: actions/download-artifact@v4.1.8
with:
name: DevSidecar-${{ steps.package-info.outputs.version }}-node16.dmg
path: release
- name: "Rename 'release/DevSidecar-${{ steps.package-info.outputs.version }}.*' to 'release/DevSidecar-${{ steps.package-info.outputs.version }}-node16.*'"
run: |
mv release/DevSidecar-${{ steps.package-info.outputs.version }}.exe release/DevSidecar-${{ steps.package-info.outputs.version }}-node16.exe;
mv release/DevSidecar-${{ steps.package-info.outputs.version }}.deb release/DevSidecar-${{ steps.package-info.outputs.version }}-node16.deb;
mv release/DevSidecar-${{ steps.package-info.outputs.version }}.AppImage release/DevSidecar-${{ steps.package-info.outputs.version }}-node16.AppImage;
mv release/DevSidecar-${{ steps.package-info.outputs.version }}.dmg release/DevSidecar-${{ steps.package-info.outputs.version }}-node16.dmg;
# Download artifacts with node17
- name: "Download DevSidecar-${{ steps.package-info.outputs.version }}-node17.exe - Windows"
uses: actions/download-artifact@v4.1.8
with:
name: DevSidecar-${{ steps.package-info.outputs.version }}-node17.exe
path: release
- name: "Download DevSidecar-${{ steps.package-info.outputs.version }}-node17.deb - Ubuntu"
uses: actions/download-artifact@v4.1.8
with:
name: DevSidecar-${{ steps.package-info.outputs.version }}-node17.deb
path: release
- name: "Download DevSidecar-${{ steps.package-info.outputs.version }}-node17.AppImage - Ubuntu"
uses: actions/download-artifact@v4.1.8
with:
name: DevSidecar-${{ steps.package-info.outputs.version }}-node17.AppImage
path: release
- name: "Download DevSidecar-${{ steps.package-info.outputs.version }}-node17.dmg - Mac"
uses: actions/download-artifact@v4.1.8
with:
name: DevSidecar-${{ steps.package-info.outputs.version }}-node17.dmg
path: release
- name: "Rename 'release/DevSidecar-${{ steps.package-info.outputs.version }}.*' to 'release/DevSidecar-${{ steps.package-info.outputs.version }}-node17.*'"
run: |
mv release/DevSidecar-${{ steps.package-info.outputs.version }}.exe release/DevSidecar-${{ steps.package-info.outputs.version }}-node17.exe;
mv release/DevSidecar-${{ steps.package-info.outputs.version }}.deb release/DevSidecar-${{ steps.package-info.outputs.version }}-node17.deb;
mv release/DevSidecar-${{ steps.package-info.outputs.version }}.AppImage release/DevSidecar-${{ steps.package-info.outputs.version }}-node17.AppImage;
mv release/DevSidecar-${{ steps.package-info.outputs.version }}.dmg release/DevSidecar-${{ steps.package-info.outputs.version }}-node17.dmg;
- name: "Print files from 'release' dir"
run: |
ls -lah release;
- name: "Create a draft release"
uses: fnkr/github-action-ghr@ghr-options
env:
GITHUB_TOKEN: ${{ github.token }}
GHR_PATH: release/
GHR_TITLE: ${{ github.ref_name }}
GHR_REPLACE: true
GHR_DRAFT: true

Loading…
Cancel
Save