v0.4.0 #1
Workflow file for this run
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: Binaries | |
on: | |
workflow_dispatch: | |
release: | |
types: [created] | |
env: | |
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup NodeJS | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
cache: npm | |
- name: Install setuptools on macOS | |
if: matrix.os == 'macos-latest' | |
run: python3 -m pip install setuptools --break-system-packages | |
- name: Install dependencies | |
run: npm ci | |
- name: Build | |
run: npx nx run-many -t build --prod | |
- name: Update version in package.json | |
# Temporary fix for https://github.com/bennymeg/nx-electron/issues/270 | |
run: | | |
node -e "const fs = require('fs'); | |
const tag = process.env.TAG || ''; | |
const version = tag.startsWith('v') ? tag.slice(1) : tag; | |
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8')); | |
pkg.version = version; | |
fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2)); | |
console.log('Updated version to:', version);" | |
env: | |
TAG: ${{ github.event.release.tag_name }} | |
- name: Build executable | |
run: npx nx run spie:make | |
- name: Upload Assets to Release | |
if: ${{ !env.ACT }} | |
uses: AButler/[email protected] | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
files: 'dist/executables/latest*.yml;dist/executables/*.xz;dist/executables/*.rpm;dist/executables/*.zip;dist/executables/*.dmg;dist/executables/*.exe;dist/executables/*.deb;dist/executables/*.blockmap' |