Skip to content

Commit

Permalink
2nd test
Browse files Browse the repository at this point in the history
  • Loading branch information
SAKIB-SALIM committed Nov 2, 2024
1 parent 579515d commit a00b640
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/build-exe-manual.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Build and Release Windows Executable

on:
workflow_dispatch: # Allows manual trigger from GitHub Actions

jobs:
build-and-release:
runs-on: windows-latest

steps:
# Step 1: Check out the repository
- name: Checkout repository
uses: actions/checkout@v3

# Step 2: Set up Python
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.12' # Specify your Python version

# Step 3: Install dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyinstaller requests pycryptodomex pywin32
# Step 4: Build the Python script into an .exe using PyInstaller
- name: Build executable
run: |
pyinstaller --onefile --icon icon.ico -w WindowsNt.py
# Step 5: Create GitHub Release and Upload the .exe
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: 'manual-release-${{ github.run_id }}' # Unique tag for each manual release
release_name: Manual Release ${{ github.run_id }}
draft: false
prerelease: false

- name: Upload .exe to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dist/WindowsNt.exe
asset_name: WindowsNt.exe
asset_content_type: application/octet-stream

0 comments on commit a00b640

Please sign in to comment.