fix(release): harden release workflow installs

This commit is contained in:
plebeius
2026-03-01 14:02:48 +08:00
parent 05e20edab4
commit ca2e024c73
+36 -7
View File
@@ -9,6 +9,9 @@ on:
tags: tags:
- 'v*' - 'v*'
env:
HUSKY: '0'
jobs: jobs:
linux: linux:
strategy: strategy:
@@ -29,7 +32,13 @@ jobs:
with: with:
node-version: 22 node-version: 22
- name: Install dependencies (with Node v22) - name: Install dependencies (with Node v22)
run: yarn install --frozen-lockfile --ignore-engines run: |
for i in 1 2 3; do
echo "yarn install attempt $i"
yarn install --frozen-lockfile --ignore-engines --network-timeout 100000 --network-concurrency 1 && break
sleep 5
[ "$i" = "3" ] && exit 1
done
# make sure the ipfs executable is executable # make sure the ipfs executable is executable
- name: Download IPFS and set permissions (with Node v22) - name: Download IPFS and set permissions (with Node v22)
run: BUILD_ARCH=${{ matrix.arch }} node electron/download-ipfs && sudo chmod +x bin/linux/ipfs run: BUILD_ARCH=${{ matrix.arch }} node electron/download-ipfs && sudo chmod +x bin/linux/ipfs
@@ -102,9 +111,10 @@ jobs:
- name: Install dependencies (with Node v22) - name: Install dependencies (with Node v22)
run: | run: |
for i in 1 2 3; do for i in 1 2 3; do
yarn install --frozen-lockfile --ignore-engines && break echo "yarn install attempt $i"
echo "Retry $i..." yarn install --frozen-lockfile --ignore-engines --network-timeout 100000 --network-concurrency 1 && break
sleep 10 sleep 5
[ "$i" = "3" ] && exit 1
done done
# make sure the ipfs executable is executable # make sure the ipfs executable is executable
- name: Download IPFS and set permissions (with Node v22) - name: Download IPFS and set permissions (with Node v22)
@@ -157,7 +167,14 @@ jobs:
with: with:
node-version: 22 node-version: 22
- name: Install dependencies (with Node v22) # --network-timeout and --network-concurrency are yarn v1 flags. - name: Install dependencies (with Node v22) # --network-timeout and --network-concurrency are yarn v1 flags.
run: yarn install --frozen-lockfile --network-timeout 100000 --network-concurrency 1 shell: bash
run: |
for i in 1 2 3; do
echo "yarn install attempt $i"
yarn install --frozen-lockfile --ignore-engines --network-timeout 100000 --network-concurrency 1 && break
sleep 5
[ "$i" = "3" ] && exit 1
done
- name: Build React app (with Node v22) - name: Build React app (with Node v22)
run: npx cross-env NODE_ENV=production yarn build run: npx cross-env NODE_ENV=production yarn build
- name: Build Electron app for Windows (x64) - name: Build Electron app for Windows (x64)
@@ -199,7 +216,13 @@ jobs:
# install all dependencies (including devDependencies needed for React build) # install all dependencies (including devDependencies needed for React build)
- name: Install dependencies (with Node v22) - name: Install dependencies (with Node v22)
run: yarn install --frozen-lockfile --ignore-engines run: |
for i in 1 2 3; do
echo "yarn install attempt $i"
yarn install --frozen-lockfile --ignore-engines --network-timeout 100000 --network-concurrency 1 && break
sleep 5
[ "$i" = "3" ] && exit 1
done
# build react app # build react app
- run: CI='' NODE_ENV=production yarn build - run: CI='' NODE_ENV=production yarn build
# set android versionCode and versionName # set android versionCode and versionName
@@ -243,7 +266,13 @@ jobs:
with: with:
node-version: 22 node-version: 22
- name: Install dependencies - name: Install dependencies
run: yarn install --frozen-lockfile --ignore-engines run: |
for i in 1 2 3; do
echo "yarn install attempt $i"
yarn install --frozen-lockfile --ignore-engines --network-timeout 100000 --network-concurrency 1 && break
sleep 5
[ "$i" = "3" ] && exit 1
done
- name: Generate final release body from GitHub assets - name: Generate final release body from GitHub assets
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}