Test Release Package #2
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: Test Release Package | |
on: | |
workflow_dispatch: # Allows manual triggering of the workflow | |
jobs: | |
Checkout_and_install_dependencies: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
# - name: Set up Python | |
# uses: actions/setup-python@v4 | |
# with: | |
# python-version: '3.x' | |
# - name: Create virtualenv | |
# run: | | |
# python -m venv .venv | |
# - name: Activate virtualenv | |
# run: | | |
# source .venv/bin/activate | |
# echo PATH=$PATH >> $GITHUB_ENV | |
# - name: Install dependencies | |
# run: | | |
# python -m pip install --upgrade pip | |
# pip install -r requirements.txt | |
start_pyinstaller: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Create Executable | |
uses: sayyid5416/pyinstaller@v1 | |
with: | |
python_ver: '3.12.0' | |
pyinstaller_ver: '>=6.10.0' | |
spec: 'MS_Teams_Busy_Light.spec' | |
requirements: 'requirements.txt' | |
upload_exe_with_name: 'MS Teams Presence Status Busy Light' | |
options: --onefile --icon=$iconFile --version-file="images/traffic_light.ico" --clean --windowed" | |
- name: Get Release ID | |
id: get_release | |
uses: actions/github-script@v6 | |
with: | |
script: | | |
const release = await github.repos.getReleaseByTag({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
tag: 'github actions test release' | |
}); | |
return release.data.id; | |
- name: Upload Release Asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.get_release.outputs.upload_url }} | |
asset_path: dist/MS_Teams_Busy_Light.exe # Replace with the actual path to your executable | |
asset_name: MS_Teams_Busy_Light.exe # Replace with the actual name of your executable | |
asset_content_type: application/octet-stream | |