Skip to content

Update README.md

Update README.md #5

name: Build and Release
on:
push:
branches:
- main
release:
types: [published]
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.11'
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install pyinstaller
- name: Build executable
run: |
pyinstaller --onefile --windowed --hidden-import=mouseinfo spam_v2.py
- name: Upload executable
uses: actions/upload-artifact@v3
with:
name: executable
path: dist/spam_v2.exe
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Create release
id: create_release
uses: actions/create-release@v1
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: This is an automated release.
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload release asset
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dist/spam_v2.exe
asset_name: spam_v2.exe
asset_content_type: application/octet-stream