Files
ultimate-ban-tracker/.gitea/workflows/release.yml
Nils Pukropp 7d1e19d881
All checks were successful
Build and Release / build (push) Successful in 5m39s
chore: bump version to 1.1.0 and automate Gitea release tagging from package.json
2026-02-21 02:38:03 +01:00

64 lines
1.8 KiB
YAML

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: Extract Version
id: get_version
run: |
VERSION=$(node -p "require('./frontend/package.json').version")
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
- 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${{ steps.get_version.outputs.VERSION }}
name: Release v${{ steps.get_version.outputs.VERSION }}
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}