Update main.yml #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 bulid | |
- 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 }}" | |