test
This commit is contained in:
@@ -1,42 +1,13 @@
|
|||||||
name: Build and Release
|
name: Manual Windows Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- 'v*'
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-windows:
|
build-windows:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Install electron-app dependencies
|
|
||||||
working-directory: electron-app
|
|
||||||
run: npm install
|
|
||||||
|
|
||||||
- name: Build and package for Windows
|
|
||||||
working-directory: electron-app
|
|
||||||
env:
|
|
||||||
WS_URL: ${{ secrets.WS_URL }}
|
|
||||||
API_URL: ${{ secrets.API_URL }}
|
|
||||||
NODE_ENV: production
|
|
||||||
RELEASE_URL: ${{ secrets.RELEASE_URL }}
|
|
||||||
run: npm run electron:build -- --win
|
|
||||||
|
|
||||||
- name: Upload Windows artifacts
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: windows-build
|
|
||||||
path: electron-app/release/*.exe
|
|
||||||
retention-days: 7
|
|
||||||
|
|
||||||
build-linux:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
@@ -44,59 +15,22 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: '20'
|
node-version: '20'
|
||||||
|
|
||||||
- name: Install electron-app dependencies
|
- name: Install dependencies
|
||||||
working-directory: electron-app
|
working-directory: electron-app
|
||||||
run: npm install
|
run: npm ci
|
||||||
|
|
||||||
- name: Build and package for Linux
|
- name: Build Windows executable
|
||||||
working-directory: electron-app
|
working-directory: electron-app
|
||||||
env:
|
env:
|
||||||
WS_URL: ${{ secrets.WS_URL }}
|
WS_URL: ${{ secrets.WS_URL }}
|
||||||
API_URL: ${{ secrets.API_URL }}
|
API_URL: ${{ secrets.API_URL }}
|
||||||
NODE_ENV: production
|
|
||||||
RELEASE_URL: ${{ secrets.RELEASE_URL }}
|
RELEASE_URL: ${{ secrets.RELEASE_URL }}
|
||||||
run: npm run electron:build -- --linux
|
NODE_ENV: production
|
||||||
|
run: npm run electron:build -- --win
|
||||||
|
|
||||||
- name: Upload Linux AppImage
|
- name: Upload Windows artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: linux-appimage
|
name: windows-exe
|
||||||
path: electron-app/release/*.AppImage
|
path: electron-app/release/*.exe
|
||||||
retention-days: 7
|
retention-days: 7
|
||||||
|
|
||||||
- name: Upload Linux deb
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: linux-deb
|
|
||||||
path: electron-app/release/*.deb
|
|
||||||
retention-days: 7
|
|
||||||
|
|
||||||
create-release:
|
|
||||||
needs: [build-windows, build-linux]
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Download all artifacts
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
path: ./artifacts
|
|
||||||
|
|
||||||
- name: Display structure of downloaded files
|
|
||||||
run: ls -R ./artifacts
|
|
||||||
|
|
||||||
- name: Create Release
|
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
with:
|
|
||||||
files: |
|
|
||||||
artifacts/windows-build/*.exe
|
|
||||||
artifacts/linux-appimage/*.AppImage
|
|
||||||
artifacts/linux-deb/*.deb
|
|
||||||
draft: false
|
|
||||||
prerelease: false
|
|
||||||
generate_release_notes: true
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user