Skip to content

Merge remote-tracking branch 'origin/master' into beta #216

Merge remote-tracking branch 'origin/master' into beta

Merge remote-tracking branch 'origin/master' into beta #216

name: Release
'on':
push:
branches:
- master
- next
- alpha
- next-major
- beta
- '*.x'
jobs:
ui:
name: build-ui
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: ui/package.json
- run: npm i -g @lytejs/mesh@beta
- run: mesh -c sync dependencies
working-directory: ./ui
- run: npm i --legacy-peer-deps
working-directory: ./ui
- run: npm run build
working-directory: ./ui
- uses: actions/upload-artifact@v3
with:
name: ui
path: |
ui/package.json
ui/dist
semantic-release-version-retrieval:
name: semantic-release-version-retrieval
runs-on: ubuntu-22.04
outputs:
version: ${{ steps.set_var.outputs.version }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: package.json
- run: npm i -g @lytejs/mesh@beta
- run: mesh -c sync dependencies
- run: npm i --legacy-peer-deps
- run: npx semantic-release --dry-run
id: set_var
env:
HUSKY: 0
NPM_TOKEN: ${{ secrets.SEMANTIC_RELEASE_BOT_NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
windows:
name: release-windows
needs: [ui, semantic-release-version-retrieval]
runs-on: windows-2019
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: package.json
- name: Remove File
uses: JesseTG/rm@v1.0.3
with:
path: ./ui
- uses: actions/download-artifact@v3
with:
name: ui
path: ui
- run: npm i -g @lytejs/mesh@beta
- run: npm cache clean --force
- run: mesh -c sync dependencies
- run: npm i --legacy-peer-deps
- run: npm --no-git-tag-version version $VERSION
env:
VERSION: ${{needs.semantic-release-version-retrieval.outputs.version}}
- run: npm run build
- run: npm run build:electron
- run: tree out /f | more
- uses: actions/upload-artifact@v3
with:
name: windows-out
path: |
out/make/zip/**/*.zip
out/make/squirrel.windows/**/*.exe
mac-x64:
name: release-mac-x64
needs: [ui, semantic-release-version-retrieval]
runs-on: macos-12
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: package.json
- run: rm -rf ui
- uses: actions/download-artifact@v3
with:
name: ui
path: ui
- run: sudo -H pip install setuptools
- run: npm i -g @lytejs/mesh@beta
- run: mesh -c sync dependencies
- run: npm i --legacy-peer-deps
- run: npm --no-git-tag-version version $VERSION
env:
VERSION: ${{needs.semantic-release-version-retrieval.outputs.version}}
- run: npm run build
- run: npm run build:electron
- run: find out -type f
- uses: actions/upload-artifact@v3
with:
name: mac-x64-out
path: |
out/make/zip/**/*.zip
mac-arm64:
name: release-mac-arm64
needs: [ui, semantic-release-version-retrieval]
runs-on: flyci-macos-large-latest-m1
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: package.json
- uses: actions/setup-python@v5
with:
python-version: 'pypy3.9'
- run: rm -rf ui
- uses: actions/download-artifact@v3
with:
name: ui
path: ui
- run: pip install setuptools
- run: npm i -g @lytejs/mesh@beta
- run: mesh -c sync dependencies
- run: npm i --legacy-peer-deps
- run: npm --no-git-tag-version version $VERSION
env:
VERSION: ${{needs.semantic-release-version-retrieval.outputs.version}}
- run: npm run build
- run: npm run build:electron
- run: find out -type f
- uses: actions/upload-artifact@v3
with:
name: mac-arm64-out
path: |
out/make/zip/**/*.zip
ubuntu:
name: release-ubuntu
runs-on: ubuntu-22.04
needs: [ui, semantic-release-version-retrieval]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: package.json
- run: rm -rf ui
- uses: actions/download-artifact@v3
with:
name: ui
path: ui
- run: npm i -g @lytejs/mesh@beta
- run: mesh -c sync dependencies
- run: npm i --legacy-peer-deps
- run: sudo apt -y install rpm
- run: npm i -g electron-installer-debian electron-installer-redhat
- run: npm --no-git-tag-version version $VERSION
env:
VERSION: ${{needs.semantic-release-version-retrieval.outputs.version}}
- run: npm run build
- run: npm run build:electron
- run: find out -type f
- uses: actions/upload-artifact@v3
with:
name: ubuntu-out
path: |
out/make/zip/**/*.zip
out/make/rpm/**/*.rpm
out/make/deb/**/*.deb
semantic-release:
name: semantic-release
runs-on: ubuntu-22.04
needs: [mac-x64, ubuntu, windows, ui]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: package.json
- run: rm -rf ui
- uses: actions/download-artifact@v3
with:
name: ui
path: ui
- run: npm i -g @lytejs/mesh@beta && mesh -c sync dependencies
- run: npm i --legacy-peer-deps
- run: npm run build
- uses: actions/download-artifact@v3
with:
name: windows-out
path: windows-out
- uses: actions/download-artifact@v3
with:
name: mac-x64-out
path: mac-x64-out
- uses: actions/download-artifact@v3
with:
name: mac-arm64-out
path: mac-arm64-out
- uses: actions/download-artifact@v3
with:
name: ubuntu-out
path: ubuntu-out
- run: npx semantic-release
env:
HUSKY: 0
NPM_TOKEN: ${{ secrets.SEMANTIC_RELEASE_BOT_NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}