-
Notifications
You must be signed in to change notification settings - Fork 44
91 lines (78 loc) · 2.45 KB
/
publish-github-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: Publish Github release
on: workflow_call
jobs:
build_apple:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Extract package version from the tag
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Print the extracted version
run: echo $RELEASE_VERSION
- uses: subosito/flutter-action@v2
- uses: bluefireteam/melos-action@v2
with:
melos-version: '2.9.0'
- uses: goto-bus-stop/setup-zig@v2
- uses: KyleMayes/install-llvm-action@v1
with:
version: "15"
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Build apple binary
run: melos run build:apple
- name: Uploading artifact
uses: actions/upload-artifact@v3
with:
name: apple_binary
path: platform-build/FlutterFueletContracts.xcframework.zip
build_android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Extract package version from the tag
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Print the extracted version
run: echo $RELEASE_VERSION
- uses: subosito/flutter-action@v2
- uses: bluefireteam/melos-action@v2
with:
melos-version: '2.9.0'
- uses: goto-bus-stop/setup-zig@v2
- uses: KyleMayes/install-llvm-action@v1
with:
version: "15"
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: nttld/setup-ndk@v1
with:
ndk-version: r25b
- name: Build android binary
run: melos run build:android
- name: Uploading artifact
uses: actions/upload-artifact@v3
with:
name: android_binary
path: platform-build/android.tar.gz
publish_github_release:
runs-on: ubuntu-latest
needs: [ build_apple, build_android ]
steps:
- uses: actions/checkout@v3
- name: Download apple binary
uses: actions/download-artifact@v3
with:
name: apple_binary
path: platform-build
- name: Download android binary
uses: actions/download-artifact@v3
with:
name: android_binary
path: platform-build
- name: Create GitHub release
uses: softprops/action-gh-release@v1
with:
name: ${{env.RELEASE_VERSION}}
files: platform-build/*