-
Notifications
You must be signed in to change notification settings - Fork 17
56 lines (52 loc) · 1.47 KB
/
swift2.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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