-
Notifications
You must be signed in to change notification settings - Fork 22
219 lines (189 loc) · 7.12 KB
/
release-dev.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
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
name: Release dev
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * 2,4"
push:
branches:
- agallardol/shinkai-tray-node-integration
defaults:
run:
working-directory: ./
jobs:
# release-shinkai-visor:
# runs-on: ubuntu-latest
# environment: development
# steps:
# - name: Check out repository
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - name: Setup Node version
# uses: actions/setup-node@v3
# with:
# node-version: 18
# check-latest: false
# registry-url: https://registry.npmjs.org
# cache: 'npm'
# cache-dependency-path: package-lock.json
# - name: Install dependencies
# run: |
# npm cache verify
# npm ci --no-audit --prefer-offline
# - name: get-npm-version
# id: package-version
# uses: martinbeentjes/[email protected]
# - name: Run NX build on shinkai-visor
# run: npx nx build shinkai-visor --skip-nx-cache
# env:
# VERSION: ${{ steps.package-version.outputs.current-version}}.${{github.run_number}}
# NAME_PREFIX: '[Dev]'
# DESCRIPTION_PREFIX: '[Dev]'
# - name: Zip extension
# run: cd ./dist/apps && zip -r shinkai-visor.zip shinkai-visor
# - name: Upload & Release
# uses: mnao305/[email protected]
# continue-on-error: true
# with:
# file-path: dist/apps/shinkai-visor.zip
# extension-id: ${{ secrets.CHROME_EXTENSION_ID }}
# client-id: ${{ secrets.CHROME_CLIENT_ID }}
# client-secret: ${{ secrets.CHROME_CLIENT_SECRET }}
# refresh-token: ${{ secrets.CHROME_REFRESH_TOKEN }}
# publish: false
# - uses: actions/upload-artifact@v3
# with:
# name: shinkai-visor
# path: dist/apps/shinkai-visor
# if-no-files-found: error
# retention-days: 5
release-shinkai-tray-macos:
name: Release Shinkai Tray
strategy:
matrix:
include:
# - arch: x86_64-unknown-linux-gnu
# os: ubuntu-22.04
- arch: aarch64-apple-darwin
os: macos-14
build_output_file_path: dist/apps/shinkai-tray/dmg/Shinkai Tray_${{ github.ref_name }}_aarch64.dmg
distributable_file_name: Shinkai-Tray-${{ github.ref_name }}_aarch64-apple-darwin.dmg
# - arch: x86_64-pc-windows-msvc
# os: windows-2022
runs-on: ${{ matrix.os }}
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Cache cargo assets
id: cache
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ matrix.arch }}-build-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Setup Node version
uses: actions/setup-node@v3
with:
node-version: 18
check-latest: false
registry-url: https://registry.npmjs.org
cache: 'npm'
cache-dependency-path: package-lock.json
- name: Install dependencies
run: |
npm cache verify
npm ci --no-audit --prefer-offline
- name: get npm version
id: package-version
uses: Saionaro/[email protected]
- name: Run NX build on shinkai-tray
run: npx nx build shinkai-tray --skip-nx-cache
env:
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
# - name: Upload binaries to release
# uses: svenstaro/upload-release-action@v2
# with:
# repo_token: ${{ secrets.GITHUB_TOKEN }}
# file: ${{ matrix.build_output_file_path }}
# asset_name: ${{ matrix.distributable_file_name }}
# tag: ${{ github.ref }}
# overwrite: true
- name: Prepare binary files
run: |
mkdir files-to-r2
cp ${{ matrix.build_output_file_path }} files-to-r2/${{ matrix.distributable_file_name }}
- name: Upload binaries to R2 bucket
uses: shallwefootball/s3-upload-action@master
with:
endpoint: https://54bf1bf573b3e6471e574cc4d318db64.r2.cloudflarestorage.com
aws_key_id: ${{ secrets.R2_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.R2_SECRET_ACCESS_KEY }}
aws_bucket: shinkai-download
source_dir: files-to-r2
destination_dir: ./shinkai-tray/binaries/${{ matrix.arch }}/
# At the moment we are not releasing android (CI was working)
# release-shinkai-app-android:
# runs-on: ubuntu-latest
# environment: development
# steps:
# - name: Check out repository
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - name: Use nx set shas
# uses: nrwl/nx-set-shas@v3
# - name: Setup Node version
# uses: actions/setup-node@v3
# with:
# node-version: 18
# check-latest: false
# registry-url: https://registry.npmjs.org
# cache: 'npm'
# cache-dependency-path: package-lock.json
# - name: Install dependencies
# run: |
# npm cache verify
# npm ci --no-audit --prefer-offline
# - uses: actions/setup-java@v3
# with:
# java-version: '17'
# distribution: 'temurin'
# - name: Set mobile apps version
# run: |
# npx capacitor-set-version -v $VERSION -b $BUILD $APP_PATH
# env:
# VERSION: 0.0.0
# BUILD: ${{ github.run_number }}
# APP_PATH: ./apps/shinkai-app
# - name: Mount shinkai android keystore from secret
# run: |
# echo $KEYSTORE_BASE_64_STRING > $KEYSTORE_BASE_64_FILE_NAME
# base64 -d $KEYSTORE_BASE_64_FILE_NAME > $KEYSTORE_FILE_PATH
# env:
# KEYSTORE_BASE_64_STRING: ${{ secrets.ANDROID_KEYSTORE_BASE_64 }}
# KEYSTORE_BASE_64_FILE_NAME: shinkai-keystore-android-upload-base-64
# KEYSTORE_FILE_PATH: ./apps/shinkai-app/android/shinkai-keystore-android
# - name: Run NX build on shinkai-app-android
# run: |
# npx nx build:android shinkai-app
# env:
# ANDROID_KEYSTORE_FILE_PATH: shinkai-keystore-android
# ANDROID_KEYSTORE_PASS: ${{ secrets.ANDROID_KEYSTORE_PASS }}
# ANDROID_KEYSTORE_ALIAS: ${{ secrets.ANDROID_KEYSTORE_ALIAS }}
# ANDROID_KEYSTORE_ALIAS_PASS: ${{ secrets.ANDROID_KEYSTORE_ALIAS_PASS }}
# - name: Upload signed android .AAB file to Google Play Store
# uses: r0adkll/upload-google-play@v1
# with:
# serviceAccountJsonPlainText: ${{ secrets.ANDROID_SERVICE_ACCOUNT_JSON }}
# packageName: com.shinkai.app
# releaseFiles: ./dist/apps/shinkai-app-android/app-release-signed.aab
# track: internal
# status: draft