Skip to content

changes to tab browse #49

changes to tab browse

changes to tab browse #49

name: Build Formidable (Pre-Release)
on:
push:
branches:
- pre-release/*
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: npm ci
- name: Build Electron App
run: npm run build
- name: Move installer to installer directory
shell: pwsh
run: |
$pkg = Get-Content package.json | ConvertFrom-Json
$version = $pkg.version
$src = "dist/Formidable Setup $version.exe"
$destDir = "installer"
$dest = "$destDir/Formidable Setup.exe"
if (-Not (Test-Path $destDir)) {
New-Item -ItemType Directory -Path $destDir | Out-Null
}
if (-Not (Test-Path $src)) {
Write-Error "Expected installer file '$src' not found!"
exit 1
}
Move-Item $src $dest -Force
- name: Upload installer artifact
uses: actions/upload-artifact@v4
with:
name: Formidable Installer (unsigned)
path: installer/Formidable Setup.exe
- name: Set version-based release metadata
shell: pwsh
run: |
$version = (Get-Content package.json | ConvertFrom-Json).version
echo "TAG_NAME=v$version-pre" >> $env:GITHUB_ENV
echo "RELEASE_NAME=Formidable v$version Pre-Release" >> $env:GITHUB_ENV
- name: Create GitHub Pre-Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.TAG_NAME }}
name: ${{ env.RELEASE_NAME }}
draft: false
prerelease: true
files: installer/Formidable Setup.exe
fail_on_unmatched_files: false
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}