mirror of
https://github.com/seemoo-lab/openhaystack.git
synced 2026-03-02 01:00:20 +00:00
Initial commit
This commit is contained in:
35
.github/workflows/build-app.yml
vendored
Normal file
35
.github/workflows/build-app.yml
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
name: "Build application"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
lint-swiftlint:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- name: "Checkout code"
|
||||
uses: actions/checkout@v2
|
||||
- name: "Run SwiftLint"
|
||||
run: swiftlint --reporter github-actions-logging
|
||||
|
||||
build-app:
|
||||
runs-on: macos-latest
|
||||
needs: lint-swiftlint
|
||||
env:
|
||||
APP: OpenHaystack
|
||||
PROJECT_DIR: OpenHaystack
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ${{ env.PROJECT_DIR }}
|
||||
steps:
|
||||
- name: "Checkout code"
|
||||
uses: actions/checkout@v2
|
||||
- name: "Select Xcode 12"
|
||||
uses: devbotsxyz/xcode-select@v1
|
||||
with:
|
||||
version: "12"
|
||||
- name: "Archive project"
|
||||
run: xcodebuild archive -scheme ${APP} -configuration release -archivePath ${APP}.xcarchive
|
||||
27
.github/workflows/build-firmware.yaml
vendored
Normal file
27
.github/workflows/build-firmware.yaml
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
name: "Build firmware"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
paths:
|
||||
- Firmware/**
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
paths:
|
||||
- Firmware/**
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: Firmware
|
||||
|
||||
jobs:
|
||||
build-firmware:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
# Build firmware image
|
||||
- name: "Install build dependencies"
|
||||
run: brew install --cask gcc-arm-embedded
|
||||
- name: "Build firmware image"
|
||||
run: make
|
||||
51
.github/workflows/release.yml
vendored
Normal file
51
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
name: "Create release"
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
|
||||
|
||||
jobs:
|
||||
build-and-release:
|
||||
name: "Create release on GitHub"
|
||||
runs-on: macos-latest
|
||||
env:
|
||||
APP: OpenHaystack
|
||||
PROJECT_DIR: OpenHaystack
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ${{ env.PROJECT_DIR }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: "Select Xcode 12"
|
||||
uses: devbotsxyz/xcode-select@v1
|
||||
with:
|
||||
version: "12"
|
||||
- name: "Archive project"
|
||||
run: xcodebuild archive -scheme ${APP} -configuration release -archivePath ${APP}.xcarchive
|
||||
- name: "Create ZIP"
|
||||
run: |
|
||||
pushd ${APP}.xcarchive/Products/Applications
|
||||
zip -r ../../../${APP}.zip ${APP}.app
|
||||
popd
|
||||
- name: "Create release"
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ github.ref }}
|
||||
release_name: Release ${{ github.ref }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
- name: "Upload release asset"
|
||||
id: upload-release-asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ${{ env.PROJECT_DIR }}/${{ env.APP }}.zip
|
||||
asset_name: ${{ env.APP }}.zip
|
||||
asset_content_type: application/zip
|
||||
Reference in New Issue
Block a user