Reversion 2.5.1 #4995
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: | |
- main | |
- development | |
- release/* | |
- hotfix/* | |
- mead/* | |
pull_request: | |
types: [ready_for_review, opened, reopened, auto_merge_enabled] | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- packCmd: l | |
os: ubuntu-latest | |
- packCmd: m | |
os: macos-latest | |
- packCmd: w | |
os: windows-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/[email protected] | |
- name: Copy builder config | |
shell: bash | |
run: | | |
timestamp=$(date +%s) | |
version=$(jq -r .version package.json | awk -F'.' '{print $1"."$2}') | |
jq --arg version "$version.$timestamp" '.version = $version' package.json > tmp.$$.json && mv tmp.$$.json package.json | |
jq --arg suffix " Internal" '.productName += $suffix' package.json > tmp.$$.json && mv tmp.$$.json package.json | |
jq --arg suffix "Internal" '.name += $suffix' package.json > tmp.$$.json && mv tmp.$$.json package.json | |
sed 's/NineChronicles@workspace/NineChroniclesInternal@workspace/g' yarn.lock > temp.txt | |
mv temp.txt yarn.lock | |
- name: Cache electron-gyp | |
uses: actions/[email protected] | |
with: | |
path: ~/.electron-gyp | |
key: ${{ runner.os }}-electron-gyp | |
- uses: actions/[email protected] | |
with: | |
node-version: 20 | |
cache: 'yarn' | |
- name: Install | |
shell: bash | |
run: yarn install --immutable | |
env: | |
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 | |
- name: build | |
shell: bash | |
run: | | |
yarn run build-internal && yarn run electron-builder -${{ matrix.packCmd }} --x64 --config ./electron-builder.local.yml --publish never | |
rm -fR ./dist/*-unpacked | |
rm -fR ./dist/mac | |
rm -fR ./dist/mac-arm64 | |
- uses: actions/[email protected] | |
with: | |
path: dist | |
name: Dist-${{ matrix.packCmd }} | |
retention-days: 3 | |
if-no-files-found: error |