forked from isar-community/isar
-
Notifications
You must be signed in to change notification settings - Fork 0
120 lines (114 loc) · 3.73 KB
/
release.yaml
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
name: Isar release
on:
push:
tags:
- "*"
jobs:
verify_version:
name: Verify version matches release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dart-lang/setup-dart@v1
- name: Verify release version
run: |
dart pub get
dart tool/verify_release_version.dart ${{ github.ref_name }}
working-directory: packages/isar
build_binaries:
name: Build Binaries
needs: verify_version
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
artifact_name: libisar_android_arm64.so
script: build_android.sh
- os: ubuntu-latest
artifact_name: libisar_android_armv7.so
script: build_android.sh armv7
- os: ubuntu-latest
artifact_name: libisar_android_x64.so
script: build_android.sh x64
- os: ubuntu-latest
artifact_name: libisar_android_x86.so
script: build_android.sh x86
- os: macos-latest
artifact_name: isar_ios.xcframework.zip
script: build_ios.sh
- os: ubuntu-20.04
artifact_name: libisar_linux_x64.so
script: build_linux.sh x64
- os: macos-latest
artifact_name: libisar_macos.dylib
script: build_macos.sh
- os: windows-latest
artifact_name: isar_windows_arm64.dll
script: build_windows.sh
- os: windows-latest
artifact_name: isar_windows_x64.dll
script: build_windows.sh x64
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Prepare Build
uses: ./.github/actions/prepare-build
- name: Set env
run: echo "ISAR_VERSION=${{ github.ref_name }}" >> $GITHUB_ENV
- name: Build binary
run: bash tool/${{ matrix.script }}
- name: Upload binary
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ matrix.artifact_name }}
asset_name: ${{ matrix.artifact_name }}
tag: ${{ github.ref }}
# testlab:
# needs: build_binaries
# uses: ./.github/workflows/testlab.yaml
# secrets: inherit
# build_inspector:
# name: Build Inspector
# needs: testlab
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: subosito/flutter-action@v2
# - name: Build
# run: flutter build web --base-href /${{ github.ref_name }}/
# working-directory: packages/isar_inspector
# - name: Deploy to GitHub Pages
# uses: JamesIves/github-pages-deploy-action@v4
# with:
# folder: packages/isar_inspector/build/web
# repository-name: isar/inspector
# token: ${{ secrets.TOKEN }}
# target-folder: ${{ github.ref_name }}
# clean: false
publish:
name: Publish
needs: build_binaries
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
- name: pub get
run: dart pub get
working-directory: packages/isar
- name: Download Binaries
run: sh tool/download_binaries.sh
- name: pub.dev credentials
run: |
mkdir -p $HOME/.config/dart
echo '${{ secrets.PUB_JSON }}' >> $HOME/.config/dart/pub-credentials.json
- name: Publish isar
run: dart pub publish --force
working-directory: packages/isar
- name: Publish isar_generator
run: dart pub publish --force
working-directory: packages/isar_generator
- name: Publish isar_flutter_libs
run: dart pub publish --force
working-directory: packages/isar_flutter_libs