Skip to content

Update build-linux.yml #4

Update build-linux.yml

Update build-linux.yml #4

Workflow file for this run

name: Build and Release QChatGPT for Linux
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '16.x'
- name: Install dependencies
run: npm install
- name: Install Quasar CLI
run: npm install -g @quasar/cli
- name: Build Quasar Electron App
run: quasar build -m electron
- name: Create ZIP Archive
run: |
cd dist/electron/Packaged
zip -r QChatGPT-linux-x64.zip QChatGPT-linux-x64
- name: Upload Build Artifacts
uses: actions/upload-artifact@v2
with:
name: qchatgpt
path: dist/electron/Packaged/QChatGPT-linux-x64.zip
release:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '16.x'
- name: Install dependencies
run: npm install
- name: Get version from package.json
id: get_version
run: echo "VERSION=$(node -p -e "require('./package.json').version")" >> $GITHUB_ENV
- name: Download Build Artifacts
uses: actions/download-artifact@v2
with:
name: qchatgpt
path: dist/electron/Packaged
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
with:
tag_name: v${{ env.VERSION }}
release_name: Release v${{ env.VERSION }}
draft: false
prerelease: false
- name: Upload Linux Release Asset
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dist/electron/Packaged/QChatGPT-linux-x64.zip
asset_name: QChatGPT-linux-x64.zip
asset_content_type: application/zip