Skip to content

Commit aebe1a7

Browse files
Merge pull request #54 from Chia-Network/develop
Release 1.0.0
2 parents a64cc82 + d7d9475 commit aebe1a7

File tree

83 files changed

+5913
-3239
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+5913
-3239
lines changed

.github/workflows/auto-release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
uses: Chia-Network/actions/clean-workspace@main
2020

2121
- name: Checkout current branch
22-
uses: actions/checkout@v3
22+
uses: actions/checkout@v4
2323
with:
2424
# Need PACKAGE_ADMIN_PAT token so when the tag is created, the tag automation runs
2525
token: ${{ secrets.PACKAGE_ADMIN_PAT }}

.github/workflows/build-installers.yaml

+69-42
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: Build & Release
22

33
on:
44
push:
5-
branches:
6-
- develop
75
tags:
86
- '**'
7+
branches:
8+
- refactor/refactor-base #remove this once rebuild is merged
99
pull_request:
1010
branches:
1111
- '**'
@@ -30,25 +30,36 @@ jobs:
3030
- uses: Chia-Network/actions/clean-workspace@main
3131

3232
- name: Checkout Code
33-
uses: actions/checkout@v3
33+
uses: actions/checkout@v4
3434

35-
- name: Setup Node 18.16
36-
uses: actions/setup-node@v3
35+
- name: Setup Node 20
36+
uses: actions/setup-node@v4
3737
with:
38-
node-version: '18.16'
38+
node-version: '20.10'
3939

4040
- name: Install Husky
4141
run: npm install --save-dev husky
4242

4343
- name: install dmg-license
4444
run: npm i dmg-license
4545

46-
- name: npm install and build
46+
- name: npm install
4747
run: |
4848
npm install
49-
npm run build
49+
50+
- name: Test for secrets access
51+
id: check_secrets
52+
shell: bash
53+
run: |
54+
unset HAS_SIGNING_SECRET
55+
56+
if [ -n "$SIGNING_SECRET" ]; then HAS_SIGNING_SECRET='true' ; fi
57+
echo "HAS_SIGNING_SECRET=${HAS_SIGNING_SECRET}" >> "$GITHUB_OUTPUT"
58+
env:
59+
SIGNING_SECRET: "${{ secrets.SM_CLIENT_CERT_FILE_B64 }}"
5060

5161
- name: Import Apple installer signing certificate
62+
if: steps.check_secrets.outputs.HAS_SIGNING_SECRET
5263
uses: Apple-Actions/import-codesign-certs@v1
5364
with:
5465
p12-file-base64: ${{ secrets.APPLE_DEV_ID_APP }}
@@ -60,6 +71,7 @@ jobs:
6071
run: npm run electron:package:mac
6172

6273
- name: Notarize
74+
if: steps.check_secrets.outputs.HAS_SIGNING_SECRET
6375
run: |
6476
DMG_FILE=$(find ${{ github.workspace }}/dist/ -type f -name '*.dmg')
6577
xcrun notarytool submit \
@@ -70,7 +82,7 @@ jobs:
7082
"$DMG_FILE"
7183
7284
- name: Upload Mac Installer
73-
uses: actions/upload-artifact@v3
85+
uses: actions/upload-artifact@v4
7486
with:
7587
name: ${{ env.APP_NAME }}-mac-installer
7688
path: ${{ github.workspace }}/dist/*.dmg
@@ -80,12 +92,12 @@ jobs:
8092
runs-on: windows-2019
8193
steps:
8294
- name: Checkout Code
83-
uses: actions/checkout@v3
95+
uses: actions/checkout@v4
8496

85-
- name: Setup Node 18.16
86-
uses: actions/setup-node@v3
97+
- name: Setup Node 20.10
98+
uses: actions/setup-node@v4
8799
with:
88-
node-version: '18.16'
100+
node-version: '20.10'
89101

90102
- name: Install Husky
91103
run: npm install --save-dev husky
@@ -101,6 +113,17 @@ jobs:
101113
- name: Build electron app
102114
run: npm run electron:package:win
103115

116+
- name: Test for secrets access
117+
id: check_secrets
118+
shell: bash
119+
run: |
120+
unset HAS_SIGNING_SECRET
121+
122+
if [ -n "$SIGNING_SECRET" ]; then HAS_SIGNING_SECRET='true' ; fi
123+
echo "HAS_SIGNING_SECRET=${HAS_SIGNING_SECRET}" >> "$GITHUB_OUTPUT"
124+
env:
125+
SIGNING_SECRET: "${{ secrets.SM_CLIENT_CERT_FILE_B64 }}"
126+
104127
# Windows Code Signing
105128
- name: Get installer name for signing
106129
shell: bash
@@ -110,6 +133,7 @@ jobs:
110133
echo "INSTALLER_FILE=$FILE" >> "$GITHUB_ENV"
111134
112135
- name: Sign windows artifacts
136+
if: steps.check_secrets.outputs.HAS_SIGNING_SECRET
113137
uses: chia-network/actions/digicert/windows-sign@main
114138
with:
115139
sm_api_key: ${{ secrets.SM_API_KEY }}
@@ -119,7 +143,7 @@ jobs:
119143
file: "${{ github.workspace }}/${{ env.INSTALLER_FILE }}"
120144

121145
- name: Upload Windows Installer
122-
uses: actions/upload-artifact@v3
146+
uses: actions/upload-artifact@v4
123147
with:
124148
name: ${{ env.APP_NAME }}-windows-installer
125149
path: "${{ github.workspace }}/${{ env.INSTALLER_FILE }}"
@@ -129,12 +153,12 @@ jobs:
129153
runs-on: ubuntu-latest
130154
steps:
131155
- name: Checkout Code
132-
uses: actions/checkout@v3
156+
uses: actions/checkout@v4
133157

134-
- name: Setup Node 18.16
135-
uses: actions/setup-node@v3
158+
- name: Setup Node 20.10
159+
uses: actions/setup-node@v4
136160
with:
137-
node-version: '18.16'
161+
node-version: '20.10'
138162

139163
- name: Install Husky
140164
run: npm install --save-dev husky
@@ -154,22 +178,22 @@ jobs:
154178
mv $ORIGINAL $MODIFIED
155179
156180
- name: Upload Linux Installer
157-
uses: actions/upload-artifact@v3
181+
uses: actions/upload-artifact@v4
158182
with:
159183
name: ${{ env.APP_NAME }}-linux-installer
160184
path: ${{ github.workspace }}/dist/*.deb
161185

162186
build_web:
163-
name: Build Core Registry UI Web App
187+
name: Build Web App
164188
runs-on: ubuntu-latest
165189
steps:
166190
- name: Checkout Code
167-
uses: actions/checkout@v3
191+
uses: actions/checkout@v4
168192

169-
- name: Setup Node 18.16
170-
uses: actions/setup-node@v3
193+
- name: Setup Node 20.10
194+
uses: actions/setup-node@v4
171195
with:
172-
node-version: '18.16'
196+
node-version: '20.10'
173197

174198
- name: Install Husky
175199
run: npm install --save-dev husky
@@ -181,10 +205,10 @@ jobs:
181205
npm run build
182206
183207
- name: Create .tar.gz of the web build
184-
run: tar -cvzf $APP_NAME-web-build.tar.gz build
208+
run: tar -cvzf ${{ env.APP_NAME }}-web-build.tar.gz build
185209

186210
- name: Upload build artifact
187-
uses: actions/upload-artifact@v3
211+
uses: actions/upload-artifact@v4
188212
with:
189213
name: ${{ env.APP_NAME }}-web-build
190214
path: ${{ env.APP_NAME }}-web-build.tar.gz
@@ -199,35 +223,35 @@ jobs:
199223
- build_web
200224
steps:
201225
- name: Download Windows artifacts
202-
uses: actions/download-artifact@v3
226+
uses: actions/download-artifact@v4
203227
with:
204228
name: ${{ env.APP_NAME }}-windows-installer
205229
path: ${{ env.APP_NAME }}-windows-installer
206230

207231
- name: Download MacOS artifacts
208-
uses: actions/download-artifact@v3
232+
uses: actions/download-artifact@v4
209233
with:
210234
name: ${{ env.APP_NAME }}-mac-installer
211235
path: ${{ env.APP_NAME }}-mac-installer
212236

213237
- name: Download Linux artifacts
214-
uses: actions/download-artifact@v3
238+
uses: actions/download-artifact@v4
215239
with:
216240
name: ${{ env.APP_NAME }}-linux-installer
217241
path: ${{ env.APP_NAME }}-linux-installer
218242

219243
- name: Download Web artifact
220-
uses: actions/download-artifact@v3
244+
uses: actions/download-artifact@v4
221245
with:
222246
name: ${{ env.APP_NAME }}-web-build
223247
path: ${{ env.APP_NAME }}-web-build
224248

225249
- name: Get Filenames
226250
run: |
227-
DMG_FILE=$(find ${{ github.workspace }}/$APP_NAME-mac-installer/ -type f -name '*.dmg')
228-
DEB_FILE=$(find ${{ github.workspace }}/$APP_NAME-linux-installer/ -type f -name '*.deb')
229-
EXE_FILE=$(find ${{ github.workspace }}/$APP_NAME-windows-installer/ -type f -name '*.exe')
230-
WEB_FILE=$(find ${{ github.workspace }}/$APP_NAME-web-build/ -type f -name '*.tar.gz')
251+
DMG_FILE=$(find ${{ github.workspace }}/${{ env.APP_NAME }}-mac-installer/ -type f -name '*.dmg')
252+
DEB_FILE=$(find ${{ github.workspace }}/${{ env.APP_NAME }}-linux-installer/ -type f -name '*.deb')
253+
EXE_FILE=$(find ${{ github.workspace }}/${{ env.APP_NAME }}-windows-installer/ -type f -name '*.exe')
254+
WEB_FILE=$(find ${{ github.workspace }}/${{ env.APP_NAME }}-web-build/ -type f -name '*.tar.gz')
231255
232256
echo "DMG_FILE=$DMG_FILE" >>$GITHUB_ENV
233257
echo "DEB_FILE=$DEB_FILE" >>$GITHUB_ENV
@@ -243,20 +267,23 @@ jobs:
243267
${{ env.EXE_FILE }}
244268
${{ env.WEB_FILE }}
245269
246-
- name: Get tag name
247-
id: tag-name
248-
run: |
249-
echo "TAGNAME=$(echo $GITHUB_REF | cut -d / -f 3)" >>$GITHUB_OUTPUT
250-
251270
- name: Get repo name
252271
id: repo-name
253272
run: |
254273
echo "REPO_NAME=$(echo "$GITHUB_REPOSITORY" | cut -d "/" -f 2)" >>$GITHUB_OUTPUT
255274
275+
- name: Get tag name
276+
id: tag-name
277+
run: |
278+
echo "TAGNAME=$(echo $GITHUB_REF | cut -d / -f 3)" >>$GITHUB_OUTPUT
279+
256280
- name: Gets JWT Token from GitHub
257281
uses: Chia-Network/actions/github/jwt@main
258282

259283
- name: Trigger apt repo update
260-
run: |
261-
curl -s -XPOST -H "Authorization: Bearer ${{ env.JWT_TOKEN }}" --data '{"climate_tokenization_repo":"${{ steps.repo-name.outputs.REPO_NAME }}","application_name":"[\"$APP_NAME\"]","release_version":"${{ steps.tag-name.outputs.TAGNAME }}","add_debian_version":"true","arm64":"false"}' ${{ secrets.GLUE_API_URL }}/api/v1/climate-tokenization/${{ github.sha }}/start
262-
curl -s -XPOST -H "Authorization: Bearer ${{ env.JWT_TOKEN }}" --data '{"climate_tokenization_repo":"${{ steps.repo-name.outputs.REPO_NAME }}","application_name":"[\"$APP_NAME\"]","release_version":"${{ steps.tag-name.outputs.TAGNAME }}","add_debian_version":"true","arm64":"false"}' ${{ secrets.GLUE_API_URL }}/api/v1/climate-tokenization/${{ github.sha }}/success/deploy
284+
uses: Chia-Network/actions/github/glue@main
285+
with:
286+
json_data: '{"climate_tokenization_repo":"${{ steps.repo-name.outputs.REPO_NAME }}","application_name":"[\"${{ env.APP_NAME }}\"]","release_version":"${{ steps.tag-name.outputs.TAGNAME }}","add_debian_version":"true","arm64":"available"}'
287+
glue_url: ${{ secrets.GLUE_API_URL }}
288+
glue_project: "climate-tokenization"
289+
glue_path: "trigger"

.github/workflows/ensure-version-increment.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ jobs:
1919
- uses: Chia-Network/actions/clean-workspace@main
2020

2121
- name: Checkout current branch
22-
uses: actions/checkout@v3
22+
uses: actions/checkout@v4
2323
with:
2424
path: branch-repo
2525

2626
- name: Checkout main
27-
uses: actions/checkout@v3
27+
uses: actions/checkout@v4
2828
with:
2929
ref: main
3030
path: main-repo

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ node_modules
33
dist
44
dist-ssr
55
*.local
6-
apps
76
build
87
theme.json
8+
public/apps
99
ExplorerCustom.svg
1010
RegistryCustom.svg
1111
TokenizationCustom.svg

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
18.16
1+
20.16

.prettierrc.cjs

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
bracketSpacing: true,
3+
singleQuote: true,
4+
trailingComma: 'all',
5+
endOfLine: 'auto',
6+
printWidth: 120,
7+
};

0 commit comments

Comments
 (0)