Build tracepusher Binaries #4
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: Build tracepusher Binaries | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
type: string | |
description: "tracepusher version (eg. 0.8.0)" | |
jobs: | |
win_build_binary: | |
name: "[WIN] Build Self Contained Binary" | |
runs-on: windows-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
ref: "main" | |
- name: Configure AWS credentials | |
uses: aws-actions/[email protected] | |
with: | |
aws-access-key-id: "${{ secrets.AWS_ACCESS_KEY_ID }}" | |
aws-secret-access-key: "${{ secrets.AWS_SECRET_ACCESS_KEY }}" | |
aws-region: "ap-southeast-2" | |
- name: Install Python and Pip Packages | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11.4' | |
cache: 'pip' | |
- name: "Install Dependencies" | |
run: pip install -r requirements.txt | |
- name: "Build Binary" | |
run: "python -m PyInstaller --onefile tracepusher.py" | |
- name: "Upload Binary to S3" | |
run: | | |
aws s3 cp dist/tracepusher.exe s3://${{ secrets.BUCKET_NAME }}/tracepusher_${{ inputs.version }}.exe | |
linux_x64_build_binary: | |
name: "[LIN x64] Build Self Contained Binary" | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
ref: "main" | |
- name: Configure AWS credentials | |
uses: aws-actions/[email protected] | |
with: | |
aws-access-key-id: "${{ secrets.AWS_ACCESS_KEY_ID }}" | |
aws-secret-access-key: "${{ secrets.AWS_SECRET_ACCESS_KEY }}" | |
aws-region: "ap-southeast-2" | |
- name: Install Python and Pip Packages | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11.4' | |
cache: 'pip' | |
- name: "Install Dependencies" | |
run: pip install -r requirements.txt | |
- name: "Build Binary" | |
run: "python -m PyInstaller --onefile tracepusher.py" | |
- name: "Rename file" | |
run: "mv dist/tracepusher dist/tracepusher_linux_x64" | |
- name: "Upload Binary to S3" | |
run: | | |
aws s3 cp dist/tracepusher_linux_x64 s3://${{ secrets.BUCKET_NAME }}/tracepusher_linux_x64_${{ inputs.version }} | |
mac_os_build_binary: | |
name: "[MacOS] Build Self Contained Binary" | |
runs-on: macos-12 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
ref: "main" | |
- name: Configure AWS credentials | |
uses: aws-actions/[email protected] | |
with: | |
aws-access-key-id: "${{ secrets.AWS_ACCESS_KEY_ID }}" | |
aws-secret-access-key: "${{ secrets.AWS_SECRET_ACCESS_KEY }}" | |
aws-region: "ap-southeast-2" | |
- name: Install Python and Pip Packages | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11.4' | |
cache: 'pip' | |
- name: "Install Dependencies" | |
run: pip install -r requirements.txt | |
- name: "Build Binary" | |
run: "python -m PyInstaller --onefile tracepusher.py" | |
- name: "Rename file" | |
run: "mv dist/tracepusher dist/tracepusher_darwin_x64" | |
- name: "Upload Binary to S3" | |
run: | | |
aws s3 cp dist/tracepusher_darwin_x64 s3://${{ secrets.BUCKET_NAME }}/tracepusher_darwin_x64_${{ inputs.version }} |