Skip to content

Updated Windows Implementation #17

Updated Windows Implementation

Updated Windows Implementation #17

Workflow file for this run

name: Release
on:
push:
branches:
- Windows-implementation-and-working
pull_request:
branches:
- Windows-implementation-and-working
jobs:
create-release:
runs-on: ubuntu-20.04
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: "v${{ github.run_number }}"
release_name: Release ${{ github.run_number }}
draft: false
prerelease: false
body: "Description of the release goes here"
- name: Set Outputs
id: set_outputs
run: |
echo "upload_url=${{ steps.create_release.outputs.upload_url }}" >> $GITHUB_ENV
electron-release:
needs: create-release
runs-on: ubuntu-20.04
defaults:
run:
working-directory: ./electron-app
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: "20" # Specify the Node.js version based on your requirements
- name: Install dependencies
run: npm install
- name: Build and Publish
run: npm run release
- name: Get Release Asset Path
id: get_asset_path
run: |
asset_path=$(find ./dist -type f -name '*.AppImage')
echo "asset_path=$asset_path" >> $GITHUB_ENV
echo "asset_name=$(basename $asset_path)" >> $GITHUB_ENV
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: ./electron-app/dist/${{ env.asset_name }} # Uses the dynamically found file path
asset_name: ${{ env.asset_name }} # Uses the dynamically set asset name
asset_content_type: application/octet-stream
installer-release:
needs: create-release
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install Nuitka
run: |
python -m pip install --upgrade pip
python -m pip install requests
python -m pip install nuitka
- name: Build Standalone Installer
run: |
python -m nuitka installer.py --standalone --onefile
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: ./installer.bin
asset_name: installer.bin
asset_content_type: application/octet-stream
electron-release-win:
needs: create-release
runs-on: windows-latest
defaults:
run:
working-directory: ./electron-app
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "20"
- name: Install dependencies
run: npm install
- name: Build and Package for Windows
run: npm run release
- name: Get Release Asset Path
id: get_asset_path
run: |
asset_path=$(find ./dist -type f -name '*.zip')
echo "asset_path=$asset_path" >> $GITHUB_ENV
echo "asset_name=$(basename $asset_path)" >> $GITHUB_ENV
shell: bash
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: ./electron-app/dist/${{ env.asset_name }}
asset_name: ${{ env.asset_name }}
asset_content_type: application/zip
installer-release-win:

Check failure on line 153 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/release.yml

Invalid workflow file

You have an error in your yaml syntax on line 153
needs: create-release
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Download Dependency Walker
run: |
Invoke-WebRequest -Uri "https://github.com/Nuitka/depends/releases/download/v2.2.0/depends.zip" -OutFile "depends.zip"
Expand-Archive -Path "depends.zip" -DestinationPath "C:\\Users\\RUNNER~1\\AppData\\Local\\Nuitka\\Nuitka\\Cache\\DOWNLOADS\\depends"
- name: Install Nuitka
run: |
python -m pip install --upgrade pip
python -m pip install nuitka requests
- name: Build Standalone Installer
env:
NUITKA_DOWNLOADS: yes
run: |
python -m nuitka installer.py --standalone --onefile --disable-dll-dependency-cache
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: ./installer.exe
asset_name: installer.exe
asset_content_type: application/octet-stream