desktop/.github/workflows/buildwindows.yml
2025-04-12 06:17:42 -05:00

48 lines
1.3 KiB
YAML

name: Build Windows Release
on:
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- name: Install dependencies
run: npm install
- name: Build for Windows
run: npm run buildwindows
- name: Find Artifact (Installer or .exe/.zip)
id: find_artifact
run: |
$artifact = Get-ChildItem -Recurse -Path dist -Include *.exe, *.msi, *.zip | Select-Object -First 1
echo "artifact_path=$($artifact.FullName)" >> $env:GITHUB_OUTPUT
- name: Create GitHub Release
id: create_release
uses: softprops/action-gh-release@v2
with:
tag_name: build-${{ github.run_number }}
name: Build ${{ github.run_number }}
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload artifact to release
uses: softprops/action-gh-release@v2
with:
tag_name: build-${{ github.run_number }}
files: ${{ steps.find_artifact.outputs.artifact_path }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}