chore(workflows): update action versions in build.yml for improved stability and performance
This commit is contained in:
@@ -37,15 +37,15 @@ jobs:
|
|||||||
contents: read
|
contents: read
|
||||||
steps:
|
steps:
|
||||||
- name: Clone Repo
|
- name: Clone Repo
|
||||||
uses: https://git.quad4.io/actions/checkout@50fbc622fc4ef5163becd7fab6573eac35f8462e # v1
|
uses: https://git.quad4.io/actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||||
|
|
||||||
- name: Install NodeJS
|
- name: Install NodeJS
|
||||||
uses: https://git.quad4.io/actions/setup-node@f1f314fca9dfce2769ece7d933488f076716723e # v1
|
uses: https://git.quad4.io/actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
|
||||||
with:
|
with:
|
||||||
node-version: 22
|
node-version: 22
|
||||||
|
|
||||||
- name: Install Python
|
- name: Install Python
|
||||||
uses: https://git.quad4.io/actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
uses: https://git.quad4.io/actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
|
||||||
with:
|
with:
|
||||||
python-version: "3.12"
|
python-version: "3.12"
|
||||||
|
|
||||||
@@ -53,9 +53,9 @@ jobs:
|
|||||||
run: python scripts/sync_version.py
|
run: python scripts/sync_version.py
|
||||||
|
|
||||||
- name: Install pnpm
|
- name: Install pnpm
|
||||||
uses: https://git.quad4.io/pnpm/action-setup@v4
|
uses: https://git.quad4.io/actions/setup-pnpm@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4
|
||||||
with:
|
with:
|
||||||
version: 10
|
version: 10.0.0
|
||||||
|
|
||||||
- name: Install NodeJS Deps
|
- name: Install NodeJS Deps
|
||||||
run: pnpm install
|
run: pnpm install
|
||||||
@@ -71,152 +71,91 @@ jobs:
|
|||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
build_desktop:
|
build_desktop:
|
||||||
name: Build Desktop (${{ matrix.name }})
|
name: Build Desktop (linux)
|
||||||
needs: build_frontend
|
needs: build_frontend
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
# - name: windows
|
|
||||||
# os: windows-latest
|
|
||||||
# node: 22
|
|
||||||
# python: "3.13"
|
|
||||||
# release_artifacts: "dist/*-win-installer.exe,dist/*-win-portable.exe"
|
|
||||||
# build_input: build_windows
|
|
||||||
# dist_script: dist-prebuilt
|
|
||||||
# variant: standard
|
|
||||||
# electron_version: "39.2.4"
|
|
||||||
# - name: mac
|
|
||||||
# os: macos-14
|
|
||||||
# node: 22
|
|
||||||
# python: "3.13"
|
|
||||||
# release_artifacts: "dist/*-mac-*.dmg"
|
|
||||||
# build_input: build_mac
|
|
||||||
# dist_script: dist:mac-universal
|
|
||||||
# variant: standard
|
|
||||||
# electron_version: "39.2.4"
|
|
||||||
- name: linux
|
|
||||||
os: ubuntu-latest
|
|
||||||
node: 22
|
|
||||||
python: "3.13"
|
|
||||||
release_artifacts: "dist/*-linux.AppImage,dist/*-linux.deb,python-dist/*.whl"
|
|
||||||
build_input: build_linux
|
|
||||||
dist_script: dist-prebuilt
|
|
||||||
variant: standard
|
|
||||||
electron_version: "39.2.4"
|
|
||||||
# - name: windows-legacy
|
|
||||||
# os: windows-latest
|
|
||||||
# node: 18
|
|
||||||
# python: "3.11"
|
|
||||||
# release_artifacts: "dist/*-win-installer*.exe,dist/*-win-portable*.exe"
|
|
||||||
# build_input: build_windows
|
|
||||||
# dist_script: dist-prebuilt
|
|
||||||
# variant: legacy
|
|
||||||
# electron_version: "30.0.8"
|
|
||||||
- name: linux-legacy
|
|
||||||
os: ubuntu-latest
|
|
||||||
node: 18
|
|
||||||
python: "3.11"
|
|
||||||
release_artifacts: "dist/*-linux*.AppImage,dist/*-linux*.deb,python-dist/*.whl"
|
|
||||||
build_input: build_linux
|
|
||||||
dist_script: dist-prebuilt
|
|
||||||
variant: legacy
|
|
||||||
electron_version: "30.0.8"
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
steps:
|
steps:
|
||||||
- name: Clone Repo
|
- name: Clone Repo
|
||||||
if: |
|
if: |
|
||||||
github.event_name == 'push' ||
|
github.event_name == 'push' ||
|
||||||
(github.event_name == 'workflow_dispatch' && inputs[matrix.build_input] == true)
|
(github.event_name == 'workflow_dispatch' && inputs.build_linux == true)
|
||||||
uses: https://git.quad4.io/actions/checkout@50fbc622fc4ef5163becd7fab6573eac35f8462e # v1
|
uses: https://git.quad4.io/actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||||
|
|
||||||
- name: Set legacy Electron version
|
|
||||||
if: |
|
|
||||||
matrix.variant == 'legacy' &&
|
|
||||||
(github.event_name == 'push' ||
|
|
||||||
(github.event_name == 'workflow_dispatch' && inputs[matrix.build_input] == true))
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
node -e "const fs=require('fs');const pkg=require('./package.json');pkg.devDependencies.electron='${{ matrix.electron_version }}';fs.writeFileSync('package.json', JSON.stringify(pkg,null,2));"
|
|
||||||
if [ -f pnpm-lock.yaml ]; then rm pnpm-lock.yaml; fi
|
|
||||||
|
|
||||||
- name: Install NodeJS
|
- name: Install NodeJS
|
||||||
if: |
|
if: |
|
||||||
github.event_name == 'push' ||
|
github.event_name == 'push' ||
|
||||||
(github.event_name == 'workflow_dispatch' && inputs[matrix.build_input] == true)
|
(github.event_name == 'workflow_dispatch' && inputs.build_linux == true)
|
||||||
uses: https://git.quad4.io/actions/setup-node@f1f314fca9dfce2769ece7d933488f076716723e # v1
|
uses: https://git.quad4.io/actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node }}
|
node-version: 22
|
||||||
|
|
||||||
- name: Install Python
|
- name: Install Python
|
||||||
if: |
|
if: |
|
||||||
github.event_name == 'push' ||
|
github.event_name == 'push' ||
|
||||||
(github.event_name == 'workflow_dispatch' && inputs[matrix.build_input] == true)
|
(github.event_name == 'workflow_dispatch' && inputs.build_linux == true)
|
||||||
uses: https://git.quad4.io/actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
uses: https://git.quad4.io/actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python }}
|
python-version: "3.13"
|
||||||
|
|
||||||
- name: Install Poetry
|
- name: Install Poetry
|
||||||
if: |
|
if: |
|
||||||
github.event_name == 'push' ||
|
github.event_name == 'push' ||
|
||||||
(github.event_name == 'workflow_dispatch' && inputs[matrix.build_input] == true)
|
(github.event_name == 'workflow_dispatch' && inputs.build_linux == true)
|
||||||
run: python -m pip install --upgrade pip poetry
|
run: python -m pip install --upgrade pip poetry==1.8.5
|
||||||
|
|
||||||
- name: Sync versions
|
- name: Sync versions
|
||||||
if: |
|
if: |
|
||||||
github.event_name == 'push' ||
|
github.event_name == 'push' ||
|
||||||
(github.event_name == 'workflow_dispatch' && inputs[matrix.build_input] == true)
|
(github.event_name == 'workflow_dispatch' && inputs.build_linux == true)
|
||||||
run: python scripts/sync_version.py
|
run: python scripts/sync_version.py
|
||||||
|
|
||||||
- name: Install Python Deps
|
- name: Install Python Deps
|
||||||
if: |
|
if: |
|
||||||
github.event_name == 'push' ||
|
github.event_name == 'push' ||
|
||||||
(github.event_name == 'workflow_dispatch' && inputs[matrix.build_input] == true)
|
(github.event_name == 'workflow_dispatch' && inputs.build_linux == true)
|
||||||
run: python -m poetry install
|
run: python -m poetry install
|
||||||
|
|
||||||
- name: Install pnpm
|
- name: Install pnpm
|
||||||
if: |
|
if: |
|
||||||
github.event_name == 'push' ||
|
github.event_name == 'push' ||
|
||||||
(github.event_name == 'workflow_dispatch' && inputs[matrix.build_input] == true)
|
(github.event_name == 'workflow_dispatch' && inputs.build_linux == true)
|
||||||
uses: https://git.quad4.io/pnpm/action-setup@v4
|
uses: https://git.quad4.io/actions/setup-pnpm@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4
|
||||||
with:
|
with:
|
||||||
version: 10
|
version: 10.0.0
|
||||||
|
|
||||||
- name: Install NodeJS Deps
|
- name: Install NodeJS Deps
|
||||||
if: |
|
if: |
|
||||||
github.event_name == 'push' ||
|
github.event_name == 'push' ||
|
||||||
(github.event_name == 'workflow_dispatch' && inputs[matrix.build_input] == true)
|
(github.event_name == 'workflow_dispatch' && inputs.build_linux == true)
|
||||||
run: pnpm install
|
run: pnpm install
|
||||||
|
|
||||||
- name: Prepare frontend directory
|
- name: Prepare frontend directory
|
||||||
if: |
|
if: |
|
||||||
github.event_name == 'push' ||
|
github.event_name == 'push' ||
|
||||||
(github.event_name == 'workflow_dispatch' && inputs[matrix.build_input] == true)
|
(github.event_name == 'workflow_dispatch' && inputs.build_linux == true)
|
||||||
run: python scripts/prepare_frontend_dir.py
|
run: python scripts/prepare_frontend_dir.py
|
||||||
|
|
||||||
- name: Download frontend artifact
|
- name: Download frontend artifact
|
||||||
if: |
|
if: |
|
||||||
github.event_name == 'push' ||
|
github.event_name == 'push' ||
|
||||||
(github.event_name == 'workflow_dispatch' && inputs[matrix.build_input] == true)
|
(github.event_name == 'workflow_dispatch' && inputs.build_linux == true)
|
||||||
uses: https://git.quad4.io/actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
|
uses: https://git.quad4.io/actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
|
||||||
with:
|
with:
|
||||||
name: frontend-build
|
name: frontend-build
|
||||||
path: meshchatx/public
|
path: meshchatx/public
|
||||||
|
|
||||||
- name: Install patchelf
|
- name: Install system dependencies
|
||||||
if: |
|
if: |
|
||||||
startsWith(matrix.name, 'linux') &&
|
github.event_name == 'push' ||
|
||||||
(github.event_name == 'push' ||
|
(github.event_name == 'workflow_dispatch' && inputs.build_linux == true)
|
||||||
(github.event_name == 'workflow_dispatch' && inputs[matrix.build_input] == true))
|
run: sudo apt-get update && sudo apt-get install -y patchelf libopusfile0 ffmpeg espeak-ng
|
||||||
run: sudo apt-get update && sudo apt-get install -y patchelf
|
|
||||||
|
|
||||||
- name: Build Python wheel
|
- name: Build Python wheel
|
||||||
if: |
|
if: |
|
||||||
startsWith(matrix.name, 'linux') &&
|
github.event_name == 'push' ||
|
||||||
(github.event_name == 'push' ||
|
(github.event_name == 'workflow_dispatch' && inputs.build_linux == true)
|
||||||
(github.event_name == 'workflow_dispatch' && inputs[matrix.build_input] == true))
|
|
||||||
run: |
|
run: |
|
||||||
python -m poetry build -f wheel
|
python -m poetry build -f wheel
|
||||||
mkdir -p python-dist
|
mkdir -p python-dist
|
||||||
@@ -226,23 +165,16 @@ jobs:
|
|||||||
- name: Build Electron App (Universal)
|
- name: Build Electron App (Universal)
|
||||||
if: |
|
if: |
|
||||||
github.event_name == 'push' ||
|
github.event_name == 'push' ||
|
||||||
(github.event_name == 'workflow_dispatch' && inputs[matrix.build_input] == true)
|
(github.event_name == 'workflow_dispatch' && inputs.build_linux == true)
|
||||||
run: pnpm run ${{ matrix.dist_script }}
|
run: pnpm run dist-prebuilt
|
||||||
|
|
||||||
- name: Rename artifacts for legacy build
|
|
||||||
if: |
|
|
||||||
matrix.variant == 'legacy' &&
|
|
||||||
(github.event_name == 'push' ||
|
|
||||||
(github.event_name == 'workflow_dispatch' && inputs[matrix.build_input] == true))
|
|
||||||
run: ./scripts/rename_legacy_artifacts.sh
|
|
||||||
|
|
||||||
- name: Upload build artifacts
|
- name: Upload build artifacts
|
||||||
if: |
|
if: |
|
||||||
github.event_name == 'push' ||
|
github.event_name == 'push' ||
|
||||||
(github.event_name == 'workflow_dispatch' && inputs[matrix.build_input] == true)
|
(github.event_name == 'workflow_dispatch' && inputs.build_linux == true)
|
||||||
uses: https://git.quad4.io/actions/upload-artifact@c24449f33cd45d4826c6702db7e49f7cdb9b551d # v3-node20
|
uses: https://git.quad4.io/actions/upload-artifact@c24449f33cd45d4826c6702db7e49f7cdb9b551d # v3-node20
|
||||||
with:
|
with:
|
||||||
name: build-${{ matrix.name }}
|
name: build-linux
|
||||||
path: |
|
path: |
|
||||||
dist/*-linux*.AppImage
|
dist/*-linux*.AppImage
|
||||||
dist/*-linux*.deb
|
dist/*-linux*.deb
|
||||||
@@ -258,7 +190,7 @@ jobs:
|
|||||||
contents: write
|
contents: write
|
||||||
steps:
|
steps:
|
||||||
- name: Download all artifacts
|
- name: Download all artifacts
|
||||||
uses: https://git.quad4.io/actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
|
uses: https://git.quad4.io/actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
|
||||||
with:
|
with:
|
||||||
path: artifacts
|
path: artifacts
|
||||||
|
|
||||||
@@ -293,7 +225,7 @@ jobs:
|
|||||||
ls -1 *.sha256 2>/dev/null || echo "No .sha256 files found"
|
ls -1 *.sha256 2>/dev/null || echo "No .sha256 files found"
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
uses: https://git.quad4.io/ncipollo/release-action@b7eabc95ff50cbeeedec83973935c8f306dfcd0b # v1
|
uses: https://git.quad4.io/actions/gitea-release-action@fe8e0322804b48e34e3bddbbf6335bd2b1046eb7 # v1
|
||||||
with:
|
with:
|
||||||
draft: true
|
draft: true
|
||||||
artifacts: "release-assets/*"
|
artifacts: "release-assets/*"
|
||||||
@@ -307,26 +239,26 @@ jobs:
|
|||||||
contents: read
|
contents: read
|
||||||
steps:
|
steps:
|
||||||
- name: Clone Repo
|
- name: Clone Repo
|
||||||
uses: https://git.quad4.io/actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
|
uses: https://git.quad4.io/actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||||
|
|
||||||
- name: Set lowercase repository owner
|
- name: Set lowercase repository owner
|
||||||
run: echo "REPO_OWNER_LC=${GITHUB_REPOSITORY_OWNER,,}" >> $GITHUB_ENV
|
run: echo "REPO_OWNER_LC=${GITHUB_REPOSITORY_OWNER,,}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: https://git.quad4.io/docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3
|
uses: https://git.quad4.io/actions/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: https://git.quad4.io/docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3
|
uses: https://git.quad4.io/actions/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
|
||||||
|
|
||||||
- name: Log in to the GitHub Container registry
|
- name: Log in to the GitHub Container registry
|
||||||
uses: https://git.quad4.io/docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3
|
uses: https://git.quad4.io/actions/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Build and push Docker images
|
- name: Build and push Docker images
|
||||||
uses: https://git.quad4.io/docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5
|
uses: https://git.quad4.io/actions/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
|
|||||||
Reference in New Issue
Block a user