Skip to content

Commit

Permalink
Update build_standalone_binaries.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
agardnerIT authored Jul 23, 2023
1 parent a6e3db0 commit 01c48a5
Showing 1 changed file with 41 additions and 38 deletions.
79 changes: 41 additions & 38 deletions .github/workflows/build_standalone_binaries.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Build Binaries
on:
workflow_dispatch:
inputs:
version:
type: string
description: "tracepusher version (eg. 0.8.0)"

jobs:
win_build_binary:
Expand All @@ -11,33 +15,12 @@ jobs:
uses: actions/checkout@v3
with:
ref: "main"
- name: Install Python and Pip Packages
uses: actions/setup-python@v4
- name: Configure AWS credentials
uses: aws-actions/[email protected]
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: "Setup git Config"
run: >
git config user.name "GitHub Actions Bot" &&
git config user.email "<>"
- name: "Add Binary to Repo"
run: >
git add dist/tracepusher.exe &&
git commit -m "add tracepusher.exe" &&
git pull &&
git push
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"
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:
Expand All @@ -47,16 +30,36 @@ jobs:
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: "Setup git Config"
run: >
git config user.name "GitHub Actions Bot" &&
git config user.email "<>"
- name: "Add Binary to Repo"
run: >
git add dist/tracepusher_linux_x64 &&
git commit -m "add tracepusher_linux_x64 binary" &&
git pull &&
git push
- 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: 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: "Setup git Config"
# run: >
# git config user.name "GitHub Actions Bot" &&
# git config user.email "<>"
# - name: "Add Binary to Repo"
# run: >
# git add dist/tracepusher_linux_x64 &&
# git commit -m "add tracepusher_linux_x64 binary" &&
# git pull &&
# git push
# TODO: Add ARM for MacOS runner when this is available: https://github.com/github/roadmap/issues/528

0 comments on commit 01c48a5

Please sign in to comment.