feat: add deb packaging and Gitea Actions automated release workflow
Build and Release / Build & Release DEB Package (push) Failing after 1m16s
Build and Release / Build & Release DEB Package (push) Failing after 1m16s
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
name: Build and Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag_name:
|
||||
description: '发布版本标签 (如 v1.0.0)'
|
||||
required: true
|
||||
default: 'v1.0.0'
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: Build & Release DEB Package
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
|
||||
- name: Install Linux build dependencies
|
||||
run: |
|
||||
sudo apt-get update || true
|
||||
sudo apt-get install -y build-essential python3 libx11-dev libxext-dev libxrender-dev
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
npm ci || npm install
|
||||
npm run rebuild
|
||||
|
||||
- name: Generate App Icons
|
||||
run: |
|
||||
python3 scripts/generate-icon.py
|
||||
|
||||
- name: Package Linux DEB
|
||||
run: |
|
||||
npm run package:deb
|
||||
|
||||
- name: Publish Release to Gitea
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GITHUB_SERVER_URL: ${{ github.server_url }}
|
||||
GITHUB_REPOSITORY: ${{ github.repository }}
|
||||
GITHUB_REF_NAME: ${{ github.event.inputs.tag_name || github.ref_name }}
|
||||
run: |
|
||||
node scripts/gitea-release.mjs
|
||||
Reference in New Issue
Block a user