This commit is contained in:
57
.gitea/workflows/release.yml
Normal file
57
.gitea/workflows/release.yml
Normal file
@@ -0,0 +1,57 @@
|
||||
name: Build and Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 25
|
||||
cache: 'npm'
|
||||
cache-dependency-path: frontend/package.json
|
||||
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
dpkg --add-architecture i386
|
||||
apt-get update
|
||||
apt-get install -y wine64 wine32 imagemagick
|
||||
cd frontend
|
||||
npm install
|
||||
|
||||
- name: Prepare Icons
|
||||
run: |
|
||||
# Convert SVG to PNG for better compatibility
|
||||
convert -background none -size 512x512 frontend/assets-build/icon.svg frontend/assets-build/icon.png
|
||||
|
||||
- name: Build Linux and Windows
|
||||
run: |
|
||||
cd frontend
|
||||
# Building for Linux (AppImage, deb) and Windows (nsis)
|
||||
npm run electron:build -- --linux --win
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
ELECTRON_BUILDER_ALLOW_EMPTY_REPOSITORY: true
|
||||
|
||||
- name: Upload Release Artifacts
|
||||
uses: softprops/action-gh-release@v2
|
||||
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main'
|
||||
with:
|
||||
files: |
|
||||
frontend/release/*.AppImage
|
||||
frontend/release/*.deb
|
||||
frontend/release/*.exe
|
||||
tag_name: v${{ github.run_number }}
|
||||
name: Release v${{ github.run_number }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
Reference in New Issue
Block a user