mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 08:55:24 +00:00
74dfdcb882
* Kickoff documentation for Orbit releasing * Fixes to the github action * Missing follow redirect on curl * Run osqueryd --version to verify before uploading artifacts * Use cmd as shell for windows-latest runner * Final set of changes to the guide
113 lines
3.6 KiB
YAML
113 lines
3.6 KiB
YAML
name: Generate Fleet Desktop targets for Orbit
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
# The workflow can be triggered by modifying FLEET_DESKTOP_VERSION env.
|
|
- '.github/workflows/generate-desktop-targets.yml'
|
|
pull_request:
|
|
paths:
|
|
# The workflow can be triggered by modifying FLEET_DESKTOP_VERSION env.
|
|
- '.github/workflows/generate-desktop-targets.yml'
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
FLEET_DESKTOP_VERSION: 0.0.1
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
desktop-macos:
|
|
runs-on: macos-latest
|
|
steps:
|
|
|
|
- name: Install Go
|
|
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab # v2
|
|
with:
|
|
go-version: '^1.17.0'
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2
|
|
|
|
- name: Import signing keys
|
|
env:
|
|
APPLE_APPLICATION_CERTIFICATE: ${{ secrets.APPLE_APPLICATION_CERTIFICATE }}
|
|
APPLE_APPLICATION_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_APPLICATION_CERTIFICATE_PASSWORD }}
|
|
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
|
|
run: |
|
|
echo "$APPLE_APPLICATION_CERTIFICATE" | base64 --decode > certificate.p12
|
|
security create-keychain -p $KEYCHAIN_PASSWORD build.keychain
|
|
security default-keychain -s build.keychain
|
|
security unlock-keychain -p $KEYCHAIN_PASSWORD build.keychain
|
|
security import certificate.p12 -k build.keychain -P $APPLE_APPLICATION_CERTIFICATE_PASSWORD -T /usr/bin/codesign
|
|
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $KEYCHAIN_PASSWORD build.keychain
|
|
security find-identity -vv
|
|
rm certificate.p12
|
|
|
|
- name: Generate desktop.app.tar.gz
|
|
env:
|
|
AC_USERNAME: ${{ secrets.APPLE_USERNAME }}
|
|
AC_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
|
|
CODESIGN_IDENTITY: 51049B247B25B3119FAE7E9C0CC4375A43E47237
|
|
run: |
|
|
AC_USERNAME=$AC_USERNAME \
|
|
AC_PASSWORD=$AC_PASSWORD \
|
|
FLEET_DESKTOP_APPLE_AUTHORITY=$CODESIGN_IDENTITY \
|
|
FLEET_DESKTOP_NOTARIZE=true \
|
|
FLEET_DESKTOP_VERSION=$FLEET_DESKTOP_VERSION \
|
|
make desktop-app-tar-gz
|
|
|
|
- name: Upload desktop.app.tar.gz
|
|
uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535 # v2
|
|
with:
|
|
name: desktop.app.tar.gz
|
|
path: desktop.app.tar.gz
|
|
|
|
desktop-windows:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
|
|
- name: Install Go
|
|
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab # v2
|
|
with:
|
|
go-version: '^1.17.0'
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2
|
|
|
|
- name: Generate fleet-desktop.exe
|
|
run: |
|
|
FLEET_DESKTOP_VERSION=$FLEET_DESKTOP_VERSION \
|
|
make desktop-windows
|
|
|
|
- name: Upload fleet-desktop.exe
|
|
uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535 # v2
|
|
with:
|
|
name: fleet-desktop.exe
|
|
path: fleet-desktop.exe
|
|
|
|
desktop-linux:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
|
|
- name: Install Go
|
|
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab # v2
|
|
with:
|
|
go-version: '^1.17.0'
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2
|
|
|
|
- name: Generate desktop.tar.gz
|
|
run: |
|
|
FLEET_DESKTOP_VERSION=$FLEET_DESKTOP_VERSION \
|
|
make desktop-linux
|
|
|
|
- name: Upload desktop.tar.gz
|
|
uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535 # v2
|
|
with:
|
|
name: desktop.tar.gz
|
|
path: desktop.tar.gz |