Update build.yaml #40
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: Electron Build and Release | |
permissions: | |
contents: write | |
on: | |
workflow_dispatch: # This will make the workflow trigger manually | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 14 | |
- name: Install Dependencies | |
run: | | |
npm install | |
echo "✔ Dependencies Installed!" | |
- name: Build for Windows | |
run: | | |
npm run build:windows | |
echo "🏗 Windows Build Finished!" | |
- name: Zip Build | |
run: | | |
tar -caf oneui-widgets.zip oneui-desktop-widgets-win32-x64 | |
echo "🧳 Build is zipped!" | |
working-directory: ${{ github.workspace }} | |
- name: Publish | |
id: create_release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: ./oneui-widgets.zip | |
name: OneUI Widgets ${{ github.run_number }} | |
tag_name: v${{ github.run_number }} | |
body: | | |
> [!NOTE] | |
> This release was auto generated | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |