Skip to content

Build HAR to OpenTelemetry Converter Binaries #3

Build HAR to OpenTelemetry Converter Binaries

Build HAR to OpenTelemetry Converter Binaries #3

name: Build HAR to OpenTelemetry Converter Binaries
on:
workflow_dispatch:
inputs:
version:
type: string
description: "har-to-otel version (eg. 0.1.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 har-to-otel/requirements.txt
- name: "Build Binary"
run: "python -m PyInstaller --onefile har-to-otel/har-to-otel.py"
- name: "Upload Binary to S3"
run: |
aws s3 cp har-to-otel/dist/har-to-otel.exe s3://${{ secrets.BUCKET_NAME }}/har-to-otel_${{ 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 har-to-otel/requirements.txt
- name: "Build Binary"
run: "python -m PyInstaller --onefile har-to-otel/har-to-otel.py"
- name: "Rename file"
run: "mv har-to-otel/dist/har-to-otel har-to-otel/dist/har-to-otel_linux_x64"
- name: "Upload Binary to S3"
run: |
aws s3 cp har-to-otel/dist/har-to-otel_linux_x64 s3://${{ secrets.BUCKET_NAME }}/har-to-otel_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 har-to-otel/requirements.txt
- name: "Build Binary"
run: "python -m PyInstaller --onefile har-to-otel/har-to-otel.py"
- name: "Rename file"
run: "mv har-to-otel/dist/har-to-otel har-to-otel/dist/har-to-otel_darwin_x64"
- name: "Upload Binary to S3"
run: |
aws s3 cp har-to-otel/dist/har-to-otel_darwin_x64 s3://${{ secrets.BUCKET_NAME }}/har-to-otel_darwin_x64_${{ inputs.version }}