Skip to content

Update main.yml

Update main.yml #6

Workflow file for this run

name: Build and Release Electron App
on:
push:
branches: [ main ] # 更改为主分支的名字,如 master 或者 main
workflow_dispatch:
jobs:
build-and-release-on-windows:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install dependencies
run: npm install
- name: Build
run: npm run make
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: ./dist/*.exe
tag_name: v${{ github.run_number }}
release_name: Release ${{ github.run_number }}
body: |
Changes in this Release:
- Add new feature
- Fix some bugs
- Improve performance
- name: Get the URL of the release
run: echo "The release is at ${{ steps.create_release.outputs.upload_url }}"