Skip to content

Commit 64e95b3

Browse files
committed
Use GitHub to host desktop client releases
2 parents 9045a58 + 5f8c581 commit 64e95b3

File tree

4 files changed

+45
-40
lines changed

4 files changed

+45
-40
lines changed

.github/workflows/deploy-desktop.yml

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
name: Build and deploy desktop clients
22
on:
33
push:
4-
branches:
5-
- main
4+
tags:
5+
- '[0-9]+.[0-9]+.[0-9]+'
66
jobs:
7+
prepare-release:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Create release
11+
uses: softprops/action-gh-release@v1
712
desktop-linux:
813
runs-on: ubuntu-latest
914
steps:
@@ -20,13 +25,10 @@ jobs:
2025
yarn run bundle-linux
2126
env:
2227
DIAFORM_API_HOST: ${{secrets.api_host}}
23-
- name: Deploy to Azure Storage
24-
run: |
25-
cd src/desktop
26-
az storage blob upload -f "./dist/Thinktool Desktop Prototype.AppImage" -c '$web' -o table
27-
env:
28-
AZURE_STORAGE_ACCOUNT: ${{secrets.azure_storage_account}}
29-
AZURE_STORAGE_KEY: ${{secrets.azure_storage_key}}
28+
- name: Create release
29+
uses: softprops/action-gh-release@v1
30+
with:
31+
files: 'src/desktop/dist/Thinktool*.AppImage'
3032
desktop-windows:
3133
runs-on: windows-2019
3234
steps:
@@ -44,11 +46,8 @@ jobs:
4446
shell: bash
4547
env:
4648
DIAFORM_API_HOST: ${{secrets.api_host}}
47-
- name: Deploy to Azure Storage
48-
run: |
49-
cd src/desktop
50-
az storage blob upload -f "./dist/Thinktool Desktop Prototype.exe" -c '$web' -o table
51-
shell: bash
52-
env:
53-
AZURE_STORAGE_ACCOUNT: ${{secrets.azure_storage_account}}
54-
AZURE_STORAGE_KEY: ${{secrets.azure_storage_key}}
49+
- name: Create release
50+
uses: softprops/action-gh-release@v1
51+
with:
52+
files: 'src/desktop/dist/Thinktool*.exe'
53+

README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,15 @@ page.
145145
### Releasing new client version
146146

147147
When you are ready to push out a client-side update, run
148-
`tools/dev/release-client.sh <version>`. This will bump the version number to
149-
`<version>`, publish the package, and also update the relevant dependency in
148+
`tools/dev/release-client.sh <client-version>`. This will bump the version number to
149+
`<client-version>`, publish the package, and also update the relevant dependency in
150150
the web and desktop clients.
151151

152-
Then commit the changes, push to origin, and in the GitHub repository, run the
153-
action titled "Deploy to Azure Storage".
152+
Manually update the version number in the `package.json` for the `desktop`
153+
package, commit the changes, tag the commit with a tag of the form `x.y.z` and
154+
push to GitHub. A workflow should automatically create a GitHub release; manually
155+
update this release with the release notes.
156+
157+
Note that the tag should be the same as the desktop client version, while the
158+
version number for the client package may be different!
154159

src/desktop/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@thinktool/desktop",
3-
"version": "0.0.0-noversion",
3+
"version": "1.0.0",
44
"description": "The desktop client for Thinktool.",
55
"license": "UNLICENSED",
66
"repository": {
@@ -28,13 +28,13 @@
2828
"build-static": "./build-static-and-client-for-desktop.sh",
2929
"build": "mkdir -p build && tsc && yarn run build-static",
3030
"start": "electron-builder --dir && ./dist/linux-unpacked/thinktool-desktop-client",
31-
"bundle-linux": "yarn run build && electron-builder -l -p never && mv 'dist/Thinktool Desktop Prototype-0.0.0-noversion.AppImage' 'dist/Thinktool Desktop Prototype.AppImage' && echo 'Output in ./dist/'",
32-
"bundle-windows": "yarn run build && electron-builder -w -p never && mv 'dist/Thinktool Desktop Prototype 0.0.0-noversion.exe' 'dist/Thinktool Desktop Prototype.exe' && echo 'Output in ./dist/'"
31+
"bundle-linux": "yarn run build && electron-builder -l -p never && echo 'Output in ./dist/'",
32+
"bundle-windows": "yarn run build && electron-builder -w -p never && echo 'Output in ./dist/'"
3333
},
3434
"main": "build/start.js",
3535
"build": {
36-
"appId": "io.thinktool.desktop.prototype",
37-
"productName": "Thinktool Desktop Prototype",
36+
"appId": "io.thinktool.desktop",
37+
"productName": "Thinktool",
3838
"files": [
3939
"build/**/*"
4040
],

src/web/pages/download.tsx

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export async function getStaticProps() {
1313
};
1414
}
1515

16-
function Timestamp(props: {date: Date}) {
16+
function Timestamp(props: { date: Date }) {
1717
const year = props.date.getUTCFullYear().toString();
1818
const monthName = [
1919
"January",
@@ -38,7 +38,7 @@ function Timestamp(props: {date: Date}) {
3838
);
3939
}
4040

41-
export default function Download(props: {apiHost: string; assetsHost: string; generatedTime: number}) {
41+
export default function Download(props: { apiHost: string; assetsHost: string; generatedTime: number }) {
4242
return (
4343
<StaticPage>
4444
<Head>
@@ -73,24 +73,25 @@ export default function Download(props: {apiHost: string; assetsHost: string; ge
7373

7474
<div className="block box small centered">
7575
<p>
76-
The current version is a <strong>pre-prototype intended purely for testing</strong>. If you use this,
77-
you may lose your data. It is not currently possible to synchronize your data in the desktop client to
78-
the online version, and it may never be (from the current version, that is)!
76+
The current version is a <strong>prototype intended purely for testing</strong>. If you use this, you
77+
may lose your data. It is not currently possible to synchronize your data in the desktop client to the
78+
online version, and it may never be (from the current version, that is)!
7979
</p>
8080
<p>
81-
Get it for <strong>Linux</strong> here:{" "}
82-
<a href={`${props.assetsHost}/Thinktool Desktop Prototype.AppImage`} download className="external-link">
83-
<span>Thinktool Desktop Prototype.AppImage</span>
81+
Download it for Linux or Windows from GitHub:{" "}
82+
<a href={`https://github.com/c2d7fa/thinktool/releases/latest`} download className="external-link">
83+
<span>Latest release</span>
8484
</a>
85-
. Just make it executable with <code>chmod +x &lt;FILENAME&gt;</code> and then run it.
8685
</p>
8786
<p>
88-
Get it for <strong>Windows</strong> here:{" "}
89-
<a href={`${props.assetsHost}/Thinktool Desktop Prototype.exe`} download className="external-link">
90-
<span>Thinktool Desktop Prototype .exe</span>
91-
</a>
92-
. This is a so-called portable executable, so you don't need to install anything &ndash; just run it.
87+
For <strong>Linux</strong>, just make the downloaded AppImage executable with{" "}
88+
<code>chmod +x &lt;FILENAME&gt;</code> and then run it.
89+
</p>
90+
<p>
91+
The <strong>Windows</strong> version is a so-called portable executable, so you don't need to install
92+
anything &ndash; just run it.
9393
</p>
94+
<p>Currently, no macOS version is available</p>
9495
<p>
9596
<i>
9697
Last updated <Timestamp date={new Date(props.generatedTime)} />.

0 commit comments

Comments
 (0)