mirror of
https://github.com/fleetbase/fleetbase.git
synced 2026-01-06 06:15:51 +00:00
91 lines
2.7 KiB
YAML
91 lines
2.7 KiB
YAML
name: Build Binaries
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
env:
|
|
DIST_DIR: builds/dist
|
|
|
|
jobs:
|
|
build-linux:
|
|
name: Linux Build
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
# - name: Run Linux build
|
|
# run: |
|
|
# chmod +x ./builds/linux/build-linux.sh
|
|
# ./builds/linux/build-linux.sh
|
|
|
|
# - name: Upload for PR testing
|
|
# if: ${{ github.event_name == 'pull_request' }}
|
|
# uses: actions/upload-artifact@v4
|
|
# with:
|
|
# name: fleetbase-api-linux-binary
|
|
# path: ${{ env.DIST_DIR }}/fleetbase-linux-x86_64
|
|
|
|
# - name: Create GitHub Release
|
|
# if: ${{ github.event_name == 'push' }}
|
|
# id: create_release
|
|
# uses: actions/create-release@v1
|
|
# with:
|
|
# tag_name: ${{ github.ref_name }}
|
|
# release_name: Release ${{ github.ref_name }}
|
|
# body: |
|
|
# • Built on ${{ github.run_started_at }}
|
|
# • Linux and macOS static binaries
|
|
# env:
|
|
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
# - name: Upload Linux to Release
|
|
# if: ${{ github.event_name == 'push' }}
|
|
# uses: actions/upload-release-asset@v1
|
|
# with:
|
|
# upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
# asset_path: ${{ env.DIST_DIR }}/fleetbase-linux-x86_64
|
|
# asset_name: fleetbase-linux-x86_64
|
|
# asset_content_type: application/octet-stream
|
|
|
|
build-osx:
|
|
name: macOS (ARM64) Build
|
|
needs: build-linux
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Install build dependencies
|
|
run: |
|
|
brew update
|
|
brew install autoconf automake coreutils asdf
|
|
ASDF_SH="$(brew --prefix asdf)/libexec/asdf.sh"
|
|
source "$ASDF_SH"
|
|
asdf plugin-add php https://github.com/asdf-community/asdf-php.git
|
|
|
|
- name: Run macOS build
|
|
run: |
|
|
chmod +x ./builds/osx/build-osx.sh
|
|
./builds/osx/build-osx.sh
|
|
|
|
- name: Upload for PR testing
|
|
if: ${{ github.event_name == 'pull_request' }}
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: fleetbase-api-macos-binary
|
|
path: ${{ env.DIST_DIR }}/fleetbase-$(uname -s)-$(uname -m)
|
|
|
|
# - name: Upload macOS to Release
|
|
# if: ${{ github.event_name == 'push' }}
|
|
# uses: actions/upload-release-asset@v1
|
|
# with:
|
|
# upload_url: ${{ needs.build-linux.steps.create_release.outputs.upload_url }}
|
|
# asset_path: ${{ env.DIST_DIR }}/fleetbase-$(uname -s)-$(uname -m)
|
|
# asset_name: fleetbase-macos-arm64
|
|
# asset_content_type: application/octet-stream |