-
Notifications
You must be signed in to change notification settings - Fork 4
62 lines (52 loc) · 1.6 KB
/
publish_swift_package.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
name: Create and Publish Swift Package
on:
workflow_dispatch:
inputs:
iOSVersionName:
description: 'iOS Version Name (eg. 0.9.0)'
required: true
jobs:
build:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '17'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Build iOS framework
id: buildPackage
run: ./gradlew createSwiftPackage --stacktrace
- name: Upload Swift Package directory
uses: actions/upload-artifact@v3
with:
name: swiftpackage
path: daraja/swiftpackage
retention-days: 1
push:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download directory with swift package
uses: actions/download-artifact@v3
with:
name: swiftpackage
path: swiftpackage
- name: Display structure of downloaded files
run: ls -R
- name: Push directory to another repository
uses: cpina/github-action-push-to-another-repository@main
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
with:
source-directory: 'swiftpackage'
destination-github-username: 'VictorKabata'
destination-repository-name: 'DarajaSwiftPackage'
create-target-branch-if-needed: true
target-branch: ${{ github.event.inputs.iOSVersionName }}