-
Notifications
You must be signed in to change notification settings - Fork 1
92 lines (69 loc) · 2.62 KB
/
build.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: "Build & Test & Release"
on:
push:
pull_request:
workflow_dispatch:
permissions:
contents: write
jobs:
test:
name: Test
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Fetch dep
run: gradle fetchDependencies
- name: Test
run: xcodebuild test -project DxFeedFramework.xcodeproj -scheme DXFeedFramework -testPlan DXExceptPublisherTests -destination 'platform=macOS'
release:
if: (startsWith(github.event.ref, 'refs/tags/') && endsWith(github.event.ref, 'build'))
name: Release
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Fetch dep
run: gradle fetchDependencies
- name: Build Archive
run: xcodebuild build -project DxFeedFramework.xcodeproj -scheme XCFramework
- name: Build Tools
run: xcodebuild -project DxFeedFramework.xcodeproj -scheme Tools -archivePath build/tools archive
- name: Check Signature
run: codesign -d -v build/tools.xcarchive/Products/usr/local/bin/Tools
- name: Zip Tools
run: cd build/tools.xcarchive; zip ../../tools.zip Products -r; cd -
- name: Build Documentations
run: xcodebuild docbuild -scheme DXFeedFramework -derivedDataPath documentations/
- name: Zip Documentations
run: cd documentations/Build/Products/Debug; zip ../../../../documentation.zip DXFeedFramework.doccarchive -r; cd -
- name: Checkl file
run: ls -al release_sp.sh
- name: Calculate package checksum
run: ./release_sp.sh ${{ github.ref_name }} DXFeedFramework
shell: sh
- name: Commit files
run: |
git config --local user.name "GitHub Action"
git commit Package.swift -m "Update Package.swift"
- name: Push to swift branch. Update swift package.
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: swift
- name: Create tag for SPM
run: |
echo ${{ github.ref_name }}
export TAG_NAME=`echo ${{ github.ref_name }} | sed 's/_build//'`
echo $TAG_NAME
git tag ${TAG_NAME}
git push origin ${TAG_NAME}
- name: Upload Archive and Documentations
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
files: |
build/DXFeedFramework.zip
documentation.zip
tools.zip
token: ${{ secrets.GITHUB_TOKEN }}