Skip to content

Update version to 0.4.0 #1

Update version to 0.4.0

Update version to 0.4.0 #1

Workflow file for this run

name: Electron App Build and Release
on:
push:
branches:
- main
- develop
jobs:
build-and-release:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
include:
- os: windows-latest
platform: windows
- os: ubuntu-latest
platform: linux
- os: macos-latest
platform: macos
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '14' # Specify the Node.js version to use, ensure it matches your project requirements
- name: Install PowerShell (Linux and macOS)
if: matrix.os != 'windows-latest'
uses: actions/setup-powershell@v2
- name: Execute Build Script
shell: pwsh
run: .\build.ps1 -BuildPlatform ${{ matrix.platform }}
- name: Extract package.json Version
shell: pwsh
run: |
$packageJson = Get-Content -Path "./package.json" -Raw | ConvertFrom-Json
echo "PACKAGE_VERSION=$($packageJson.version)" >> $GITHUB_ENV
- name: Define Artifact Path
shell: pwsh
run: |
$platform = "${{ matrix.platform }}"
$version = "${{ env.PACKAGE_VERSION }}"
$artifactPath = ""
if ($platform -eq "windows") {
$artifactPath = "out/make/squirrel.windows/x64/wingman-$version Setup.exe"
} elseif ($platform -eq "linux") {
$artifactPath = "out/make/wingman-$version.deb"
} elseif ($platform -eq "macos") {
$artifactPath = "out/make/wingman-$version-universal.dmg"
}
echo "ARTIFACT_PATH=$artifactPath" >> $GITHUB_ENV
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: app-${{ matrix.platform }}-${{ env.PACKAGE_VERSION }}
path: ${{ env.ARTIFACT_PATH }}
- name: Create and Push Git Tag
if: github.ref == 'refs/heads/main'
shell: pwsh
run: |
git config user.name "github-actions"
git config user.email "[email protected]"
git tag -a "v${{ env.PACKAGE_VERSION }}" -m "Release version ${{ env.PACKAGE_VERSION }}"
git push origin "v${{ env.PACKAGE_VERSION }}"