mirror of
https://github.com/fleetbase/fleetbase.git
synced 2026-01-06 06:15:51 +00:00
updated docker-compose to use latest images, patched osx binary build script, experimenting with artifact upload for binaries
This commit is contained in:
82
.github/workflows/build-binaries.yml
vendored
82
.github/workflows/build-binaries.yml
vendored
@@ -1,10 +1,9 @@
|
||||
name: Build Binaries
|
||||
name: Build & Publish Binaries
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
env:
|
||||
DIST_DIR: builds/dist
|
||||
@@ -15,51 +14,29 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
# - name: Run Linux build
|
||||
# run: |
|
||||
# chmod +x ./builds/linux/build-linux.sh
|
||||
# ./builds/linux/build-linux.sh
|
||||
- name: Build Linux binary
|
||||
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: Upload Linux binary
|
||||
if: github.event_name == 'release'
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: |
|
||||
${{ env.DIST_DIR }}/fleetbase-linux-x86_64
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
# - 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:
|
||||
build-macos:
|
||||
name: macOS (ARM64) Build
|
||||
needs: build-linux
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
@@ -68,23 +45,16 @@ jobs:
|
||||
source "$(brew --prefix asdf)/libexec/asdf.sh"
|
||||
asdf plugin add php https://github.com/asdf-community/asdf-php.git
|
||||
|
||||
- name: Run macOS build
|
||||
- name: Build macOS binary
|
||||
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
|
||||
- name: Upload macOS binary
|
||||
if: github.event_name == 'release'
|
||||
uses: softprops/action-gh-release@v2
|
||||
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
|
||||
files: |
|
||||
${{ env.DIST_DIR }}/fleetbase-darwin-arm64
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
Reference in New Issue
Block a user