the-creators-galaxy / hts-distribution-tool

Hedera Token Service Distribution Tool
MIT License
10 stars 0 forks source link

GH Actions Electron Autobuild #27

Open Cooper-Kunz opened 2 years ago

Cooper-Kunz commented 2 years ago

Issue

There isn't an easy way to distribute/use the app without a developer toolchain installed, e.g. node/npm

Potential Solutions

Implement GH Actions to release a new build on each major version change.

Related work

Electron Builder Action

Questions

Is this overkill/unnecessary given the projects current size?

brett-frank commented 2 years ago

Updating this issue with what I have found so far. Deploying the application proved to be relatively simple. All thats really needed to deploy the app is a build script in the package.json file and a workflow file in the .github/workflows directory. You can find an example of the workflow file from this link. Additionally, I used this link to help write the following build script: "build": { "productName": "Creator's Galaxy Token Distribution Tool", "appId": "com.calaxy.htsdistributiontool", "icon": "public/app-icon.png", "mac": { "category": "public.app-category.developer-tools", "type": "distribution" }, "publish": "github" }

Adding these items allows you to launch the application from your device without having to rely on the terminal, which is super convenient.

One thing that I wasn't able to get to work was the autoUpdater feature which is built into electron-builder. Without this feature, there isn't really a purpose to deploy the app since you'd still need to perform a "git pull" from the terminal to receive the newest version of the app. I believe that this feature wasn't working as expected because I was not code signing my electron application.

With that being said, I'm going to remove myself as an assignee due to the fact that I'm not that familiar with code signing for Macs and publishing GitHub releases. Let me know if you have any questions!