-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (56 loc) · 2.25 KB
/
release_all_frameworks.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
name: 'Build and Publish SDDS Components'
on:
push:
tags:
- "SDDS-v[0-9]+.[0-9]+.[0-9]+"
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
jobs:
build-and-publish:
name: Build and Publish
runs-on: macos-latest
environment: sdds
strategy:
matrix:
module:
- name: SDDSComponents
project_path: SDDSComponents/SDDSComponents.xcodeproj
- name: SDDSThemeCore
project_path: SDDSThemeBuilder/SDDSThemeBuilder.xcodeproj
steps:
- name: Checkout the code
uses: actions/checkout@v4
- name: Set up Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: 'latest'
- name: Install the Apple certificate and provisioning profile
env:
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
P12_PASSWORD: ${{ secrets.P12_PASSWORD }}
BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.BUILD_PROVISION_PROFILE_BASE64 }}
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
run: |
chmod +x ./scripts/install_certificate_and_profile.sh
./scripts/install_certificate_and_profile.sh "$RUNNER_TEMP" "$BUILD_CERTIFICATE_BASE64" "$P12_PASSWORD" "$BUILD_PROVISION_PROFILE_BASE64" "$KEYCHAIN_PASSWORD"
- name: Install dependencies
run: gem install xcodeproj
- name: Run build script for ${{ matrix.module.name }}
run: |
chmod +x ./scripts/build_xcframeworks.rb
ruby ./scripts/build_xcframeworks.rb -d . -p ${{ matrix.module.project_path }} -m ${{ matrix.module.name }}
- name: Generate ${{ matrix.module.name }} zip
id: zip_artifact
run: |
TAG_NAME=${GITHUB_REF#refs/tags/}
cd ${{ matrix.module.name }}/build
zip -r ../../${{ matrix.module.name }}-${TAG_NAME}.zip .
cd ../..
echo "::set-output name=zip_path::${{ matrix.module.name }}-${TAG_NAME}.zip"
- name: Release ${{ matrix.module.name }}
uses: softprops/action-gh-release@v2
with:
files: ${{ steps.zip_artifact.outputs.zip_path }}
tag_name: ${{ github.ref_name }}
token: ${{ secrets.GH_TOKEN }}