Files
AudioSort/.github/workflows/build-all.yml

88 lines
1.9 KiB
YAML

name: Build All Platforms
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
build-windows:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm install
- name: Build Windows
run: npm run dist:win
- name: Upload Windows artifacts
uses: actions/upload-artifact@v4
with:
name: windows-installer
path: release/*.exe
build-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm install
- name: Build Linux
run: npm run dist:linux
- name: Upload Linux artifacts
uses: actions/upload-artifact@v4
with:
name: linux-packages
path: |
release/*.AppImage
release/*.deb
release/*.rpm
release/*.snap
release:
needs: [build-windows, build-linux]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Download Windows artifacts
uses: actions/download-artifact@v4
with:
name: windows-installer
- name: Download Linux artifacts
uses: actions/download-artifact@v4
with:
name: linux-packages
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: |
*.exe
*.AppImage
*.deb
*.rpm
*.snap
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}