Skip to content

Update python-app.yml #19

Update python-app.yml

Update python-app.yml #19

Workflow file for this run

name: Build Executable
on:
push:
branches:
- master # Trigger on push to master branch
jobs:
build:
runs-on: windows-latest # Use a Windows runner
permissions:
contents: 'read'
id-token: 'write'
steps:
- uses: 'actions/checkout@v4'
with:
fetch-depth: 0
- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.GCLOUD_BUCKET_SERVICE_USER_SECRET }}'
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Determine Version
id: version
run: |
$VERSION = python -c "import sys; sys.path.append('msldap'); import _version; print(_version.__version__)"
echo "Version: $VERSION"
echo "::set-output name=VERSION::$VERSION"
shell: powershell
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install pyinstaller
- name: Run Batch File to Build Executable
run: builder\pyinstaller\build.bat # Replace with the path to your batch file
# Optional: Upload the built executable as an artifact
- name: Upload Executable
uses: actions/upload-artifact@v2
with:
name: executable
path: builder\pyinstaller\*.exe # Replace with the path to your built executable
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v1'
with:
version: '>= 390.0.0'
- name: Upload Executables to GCS
run: |
gsutil cp builder\pyinstaller\*.exe gs://skelsec-github-foss/msldap/${{ steps.version.outputs.VERSION }}/