-
Notifications
You must be signed in to change notification settings - Fork 0
157 lines (133 loc) · 4.48 KB
/
wallet-release.yml
File metadata and controls
157 lines (133 loc) · 4.48 KB
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
name: FlowMemory app release
on:
workflow_dispatch:
push:
tags:
- "wallet-v*"
permissions:
contents: write
jobs:
desktop:
name: Desktop app (${{ matrix.name }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: windows
os: windows-latest
command: npm run desktop:installer:win
artifact: apps/dashboard/release/*
- name: macos
os: macos-latest
command: npm run desktop:installer:mac
artifact: apps/dashboard/release/*
- name: linux
os: ubuntu-latest
command: npm run desktop:installer:linux
artifact: apps/dashboard/release/*
defaults:
run:
working-directory: apps/dashboard
env:
CSC_IDENTITY_AUTO_DISCOVERY: "false"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: "24"
cache: npm
cache-dependency-path: apps/dashboard/package-lock.json
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
- name: Build desktop app
run: ${{ matrix.command }}
- name: Upload desktop artifact
uses: actions/upload-artifact@v4
with:
name: flowmemory-desktop-${{ matrix.name }}
path: ${{ matrix.artifact }}
if-no-files-found: error
android:
name: Android operator APK
runs-on: ubuntu-latest
defaults:
run:
working-directory: apps/dashboard
env:
HAS_ANDROID_RELEASE_KEYSTORE: ${{ secrets.FLOWMEMORY_ANDROID_KEYSTORE_BASE64 != '' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: "24"
cache: npm
cache-dependency-path: apps/dashboard/package-lock.json
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "21"
- name: Install dependencies
run: npm ci
- name: Sync Android project
run: npm run mobile:android:sync
- name: Make Gradle wrapper executable
run: chmod +x ./gradlew
working-directory: apps/dashboard/android
- name: Build debug APK
run: ./gradlew assembleDebug
working-directory: apps/dashboard/android
- name: Decode Android release keystore
if: env.HAS_ANDROID_RELEASE_KEYSTORE == 'true'
shell: bash
run: |
echo "$FLOWMEMORY_ANDROID_KEYSTORE_BASE64" | base64 -d > flowmemory-release.keystore
env:
FLOWMEMORY_ANDROID_KEYSTORE_BASE64: ${{ secrets.FLOWMEMORY_ANDROID_KEYSTORE_BASE64 }}
- name: Build signed release APK
if: env.HAS_ANDROID_RELEASE_KEYSTORE == 'true'
run: ./gradlew assembleRelease
working-directory: apps/dashboard/android
env:
FLOWMEMORY_ANDROID_KEYSTORE_FILE: ${{ github.workspace }}/apps/dashboard/flowmemory-release.keystore
FLOWMEMORY_ANDROID_KEYSTORE_PASSWORD: ${{ secrets.FLOWMEMORY_ANDROID_KEYSTORE_PASSWORD }}
FLOWMEMORY_ANDROID_KEY_ALIAS: ${{ secrets.FLOWMEMORY_ANDROID_KEY_ALIAS }}
FLOWMEMORY_ANDROID_KEY_PASSWORD: ${{ secrets.FLOWMEMORY_ANDROID_KEY_PASSWORD }}
- name: Upload Android APKs
uses: actions/upload-artifact@v4
with:
name: flowmemory-android
path: |
apps/dashboard/android/app/build/outputs/apk/debug/*.apk
apps/dashboard/android/app/build/outputs/apk/release/*.apk
if-no-files-found: error
github-release:
name: Publish tagged GitHub release
runs-on: ubuntu-latest
needs:
- desktop
- android
if: startsWith(github.ref, 'refs/tags/wallet-v')
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: release-artifacts
- name: Publish release
shell: bash
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
run: |
gh release create "$GITHUB_REF_NAME" \
--title "FlowMemory $GITHUB_REF_NAME" \
--notes "Desktop and Android FlowMemory app builds generated from $GITHUB_SHA."
find release-artifacts -type f -print0 \
| xargs -0 -I {} gh release upload "$GITHUB_REF_NAME" "{}" --clobber