mirror of
https://github.com/litruv/AudioSort.git
synced 2026-07-24 02:36:01 +10:00
90 lines
2.0 KiB
YAML
90 lines
2.0 KiB
YAML
name: Build All Platforms
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-windows:
|
|
runs-on: [self-hosted, windows]
|
|
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
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Upload Windows artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: windows-installer
|
|
path: release/*.exe
|
|
|
|
build-linux:
|
|
runs-on: [self-hosted, linux]
|
|
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
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Upload Linux artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: linux-packages
|
|
path: |
|
|
release/*.AppImage
|
|
release/*.deb
|
|
release/*.rpm
|
|
|
|
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
|
|
draft: false
|
|
prerelease: false
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|