Bump version #1861
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/release | |
on: | |
push: | |
branches: | |
- main-v2 | |
- feature/* | |
tags: | |
- v* | |
pull_request: | |
branches: | |
- main-v2 | |
# env: | |
# DEBUG: '*' | |
jobs: | |
release: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-latest, ubuntu-latest, windows-latest] | |
steps: | |
- name: Checkout Git repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install Node.js, NPM and Yarn | |
uses: actions/setup-node@v3.7.0 | |
with: | |
node-version: 18 | |
- run: rustup target add aarch64-apple-darwin | |
if: matrix.os == 'macos-latest' | |
- run: New-Item -Name downloads -Path $env:VCPKG_INSTALLATION_ROOT -ItemType Directory | |
if: runner.os == 'Windows' | |
- run: New-Item -Name archives -Path $env:VCPKG_INSTALLATION_ROOT -ItemType Directory | |
if: runner.os == 'Windows' | |
- run: Invoke-WebRequest -Uri https://fossies.org/windows/misc/nasm-2.16.01-win64.zip -OutFile $env:VCPKG_INSTALLATION_ROOT\downloads\nasm-2.16.01-win64.zip | |
if: runner.os == 'Windows' | |
- run: cd $env:VCPKG_INSTALLATION_ROOT && dir && dir $env:VCPKG_INSTALLATION_ROOT | |
if: runner.os == 'Windows' | |
- name: Set up vcpkg cache | |
uses: actions/cache@v3 | |
continue-on-error: false | |
with: | |
path: | | |
$env:VCPKG_INSTALLATION_ROOT\downloads\ | |
$env:VCPKG_INSTALLATION_ROOT\archives\ | |
key: ${{ runner.os }}-${{ runner.arch }}-vcpkg | |
restore-keys: ${{ runner.os }}-${{ runner.arch }}-vcpkg- | |
if: runner.os == 'Windows' | |
- run: echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append | |
if: runner.os == 'Windows' | |
- run: vcpkg install openssl:x64-windows-static-md | |
if: runner.os == 'Windows' | |
- name: Set up cargo cache | |
uses: actions/cache@v3 | |
continue-on-error: false | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
xal-node/target/ | |
key: ${{ runner.os }}-${{ runner.arch }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: ${{ runner.os }}-${{ runner.arch }}-cargo- | |
- name: Set up node_modules cache | |
uses: actions/cache@v3 | |
continue-on-error: false | |
with: | |
path: | | |
node_modules/ | |
xal-node/node_modules/ | |
key: ${{ runner.os }}-${{ runner.arch }}-npm-${{ hashFiles('**/package.json') }}-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: ${{ runner.os }}-${{ runner.arch }}-npm- | |
- name: Install yarn dependencies | |
run: yarn | |
- name: Build/release Electron app | |
uses: samuelmeuli/action-electron-builder@v1.6.0 | |
with: | |
# GitHub token, automatically provided to the action | |
# (No need to define this secret in the repo settings) | |
github_token: ${{ secrets.github_token }} | |
# If the commit is tagged with a version (e.g. "v1.0.0"), | |
# release the app after building | |
release: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
# if: startsWith(github.ref, 'refs/tags/v') | |
- name: Publish Linux AppImage | |
uses: actions/upload-artifact@v3 | |
with: | |
name: greenlight-linux.AppImage | |
path: | | |
dist/*.AppImage | |
if: matrix.os == 'ubuntu-latest' && contains(github.event.head_commit.message, '[build]') | |
- name: Publish Linux DEB | |
uses: actions/upload-artifact@v3 | |
with: | |
name: greenlight-linux.deb | |
path: | | |
dist/*.deb | |
if: matrix.os == 'ubuntu-latest' && contains(github.event.head_commit.message, '[build]') | |
- name: Publish Mac DMG | |
uses: actions/upload-artifact@v3 | |
with: | |
name: greenlight-macos.dmg | |
path: | | |
dist/*.dmg | |
if: matrix.os == 'macos-latest' && contains(github.event.head_commit.message, '[build]') | |
- name: Publish Windows EXE | |
uses: actions/upload-artifact@v3 | |
with: | |
name: greenlight-win.zip | |
path: | | |
dist/*.exe | |
if: matrix.os == 'windows-latest' && contains(github.event.head_commit.message, '[build]') |