-
Notifications
You must be signed in to change notification settings - Fork 4
91 lines (82 loc) · 2.51 KB
/
release.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
name: "Release"
on:
workflow_dispatch:
inputs:
version:
description: 'New release version, eg. 0.MINOR.PATCH'
required: true
type: string
jobs:
build-swift:
name: Build and package swift library
runs-on: macos-12
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
path: build
- name: Build and package swift
working-directory: build
run: |
make build-swift -j4
- name: Setup xcframework
working-directory: build
run: |
rm lightspark-cryptoFFI.xcframework.zip || true
zip -9 -r lightspark-cryptoFFI.xcframework.zip lightspark-crypto-swift/lightspark_cryptoFFI.xcframework
- name: Upload xcframework artifact
uses: actions/upload-artifact@v3
with:
name: "lightspark-cryptoFFI-xcframework"
path: "build/lightspark-cryptoFFI.xcframework.zip"
build-kotlin:
name: Build and package kotlin library
runs-on: macos-12
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
path: build
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Build for Android
working-directory: build
run: |
make build-android -j4
- name: Build JVM
working-directory: build
run: |
make build-jvm -j2
- name: Setup artifact
working-directory: build
run: |
zip -9 -r lightspark-cryptoFFI-kotlin.zip lightspark-crypto-kotlin/
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: "lightspark-cryptoFFI-kotlin"
path: "build/lightspark-cryptoFFI-kotlin.zip"
create-release:
name: Create release and tag
needs: [build-kotlin, build-swift]
runs-on: ubuntu-22.04
steps:
- name: Download ios artifacts
uses: actions/download-artifact@v3
with:
name: lightspark-cryptoFFI-xcframework
- name: Download kotlin artifacts
uses: actions/download-artifact@v3
with:
name: lightspark-cryptoFFI-kotlin
- name: Create release
uses: ncipollo/release-action@2c591bcc8ecdcd2db72b97d6147f871fcd833ba5
with:
artifacts: "./lightspark-cryptoFFI*"
tag: ${{ inputs.version }}
token: ${{ secrets.GITHUB_TOKEN }}
name: ${{ inputs.version }}
prerelease: true