Edit build.yml / remove build-and-release.yml

This commit is contained in:
Thomas Roque 2023-05-01 15:46:39 +02:00
parent 542f3e77a6
commit f18fe58c2b
2 changed files with 25 additions and 83 deletions

View File

@ -1,83 +0,0 @@
name: Build and Deploy Electron App
on: push
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: '18'
- name: Install dependencies
run: npm install
- name: Build Electron app
run: npm run dist
- name: Archive built files
uses: actions/upload-artifact@v2
with:
name: electron-build
path: dist/
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Download built files
uses: actions/download-artifact@v2
with:
name: electron-build
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '18'
- name: Install dependencies
run: npm install
- name: Deploy release to GitHub
uses: softprops/action-gh-release@v1
with:
files: |
dist/*
tag_name: v${{ github.ref }}
title: Release ${{ github.ref }}
body: Release of ${{ github.sha }}
- name: Publish to GitHub Packages
uses: actions/checkout@v2
with:
ref: ${{ github.ref }}
repository: ${{ github.repository }}
env:
NODE_AUTH_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Install Dependencies
run: |
cd src
npm install
- name: Build
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: npm run dist
shell: bash
- name: Build and Publish the Electron App to GitHub Packages
uses: samuelmeuli/action-electron-builder@v2
with:
publish: always
draft: true
prerelease: false
token: ${{ secrets.GH_TOKEN }}

View File

@ -36,3 +36,28 @@ jobs:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: npm run dist
shell: bash
- name: Deploy release to GitHub
uses: softprops/action-gh-release@v1
with:
files: |
dist/*
tag_name: v${{ github.ref }}
title: Release ${{ github.ref }}
body: Release of ${{ github.sha }}
- name: Publish to GitHub Packages
uses: actions/checkout@v2
with:
ref: ${{ github.ref }}
repository: ${{ github.repository }}
env:
NODE_AUTH_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Build and Publish the Electron App to GitHub Packages
uses: samuelmeuli/action-electron-builder@v2
with:
publish: always
draft: true
prerelease: false
token: ${{ secrets.GH_TOKEN }}