Skip to content

Test and Create Release #26

Test and Create Release

Test and Create Release #26

Workflow file for this run

name: Test and Create Release
# Create XCFramework when a version is tagged
on:
push:
tags:
- '*'
env:
XCODE_VER: '14.1'
jobs:
test:
strategy:
matrix:
xcode_version: ['14.1']
runs-on: macos-12
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode_version }}.app
steps:
- name: Check out LittleBlueTooth
uses: actions/checkout@v2
- name: Build LittleBlueTooth
run: |
set -euo pipefail
swift package clean
swift build --sanitize="address"
- name: Run Tests
run: |
set -euo pipefail
swift test --sanitize="address"
# Upload release assets for tags
release:
needs: test
if: startsWith(github.ref, 'refs/tags/')
runs-on: macos-12
steps:
- name: Check out LittleBlueTooth
uses: actions/checkout@v2
- name: Build XCFrameworks
run: |
set -euo pipefail
sudo xcode-select -s /Applications/Xcode_${XCODE_VER}.app
swift build --sanitize="address"
./buildXCFramework.sh
cd xcframeworks
cp ../LICENSE .
zip -9r LittleBlueTooth.xcframeworks.zip *.xcframework LICENSE
- name: Upload files to release draft
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
prerelease: false
draft: true
files: xcframeworks/LittleBlueTooth.xcframeworks.zip