-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update build_standalone_binaries.yml
- Loading branch information
1 parent
a6e3db0
commit 01c48a5
Showing
1 changed file
with
41 additions
and
38 deletions.
There are no files selected for viewing
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
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: | ||
|
@@ -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: | ||
|
@@ -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 |