Skip to content

use bash for set version from tag step to fix windows version in release #83

use bash for set version from tag step to fix windows version in release

use bash for set version from tag step to fix windows version in release #83

Workflow file for this run

name: Build/release Electron app
on:
push:
tags:
- 'v*.*.*'
jobs:
release:
runs-on: ${{ matrix.os }}
env:
EP_DRAFT: 'true'
strategy:
matrix:
include:
- os: macos-latest
platform: mac
arch: arm64
- os: macos-15-intel
platform: mac
arch: x64
- os: ubuntu-latest
platform: linux
arch: x64
- os: ubuntu-24.04-arm
platform: linux
arch: arm64
- os: windows-latest
platform: windows
arch: x64
- os: windows-11-arm
platform: windows
arch: arm64
steps:
- name: Check out Git repository
uses: actions/checkout@v3
- name: Install system FPM (Linux ARM64)
if: matrix.platform == 'linux' && matrix.arch == 'arm64'
run: |
sudo apt-get update
sudo apt-get install -y ruby ruby-dev rubygems build-essential
sudo gem install --no-document fpm
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- name: Set version from tag
shell: bash
run: npm version "${GITHUB_REF_NAME#v}" --no-git-tag-version
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- name: Run Electron Builder (Windows)
if: matrix.platform == 'windows'
run: npx electron-builder --windows --${{ matrix.arch }} --publish always
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Run Electron Builder (Linux x64)
if: matrix.platform == 'linux' && matrix.arch == 'x64'
run: npx electron-builder --linux deb tar.gz rpm --x64 --publish always
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Run Electron Builder (Linux ARM64)
if: matrix.platform == 'linux' && matrix.arch == 'arm64'
run: npx electron-builder --linux AppImage --arm64 --publish always
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
USE_SYSTEM_FPM: 'true'
- name: Run Electron Builder (macOS)
if: matrix.platform == 'mac'
run: |
echo "$API_KEY" > apple.p8
npx electron-builder --mac --${{ matrix.arch }} --publish always
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
CSC_LINK: ${{ secrets.MAC_CERTS }}
CSC_KEY_PASSWORD: ${{ secrets.MAC_CERTS_PASSWORD }}
API_KEY: ${{ secrets.API_KEY }}
APPLE_API_KEY: apple.p8
APPLE_API_KEY_ID: ${{ secrets.API_KEY_ID }}
APPLE_API_ISSUER: ${{ secrets.API_KEY_ISSUER_ID }}