diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..c5ba1ae4 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,45 @@ +on: + push: + branches: + - rewrite + pull_request: + workflow_dispatch: + +jobs: + build: + runs-on: macos-latest + steps: + - name: Check out repositoty + uses: actions/checkout@v3 + + - name: Set up nodejs + uses: actions/setup-node@v3 + with: + node-version: 18 + + - name: Set up npm project + run: npm install + + - name: build project + run: electron-builder -c electron-builder.yml -mwl + + - name: Move x64 exe + run: mv dist/SteamDepotDownloaderGUI*.exe SteamDepotDownloaderGUI-${{ github.run_number }}.exe + + - name: Move x64 AppImage + run: mv dist/SteamDepotDownloaderGUI-*.AppImage SteamDepotDownloaderGUI-${{ github.run_number }}.AppImage + + - name: Move x64 zip + run: mv dist/SteamDepotDownloaderGUI-*.zip SteamDepotDownloaderGUI-${{ github.run_number }}.zip + + - name: Move arm64 AppImage + run: mv dist/*-arm64.AppImage SteamDepotDownloaderGUI-${{ github.run_number }}-arm64.AppImage + + - name: Move arm64 zip + run: mv dist/*-arm64.zip SteamDepotDownloaderGUI-${{ github.run_number }}-arm64.zip + + - name: Upload artifacts + uses: actions/upload-artifact@v3 + with: + name: SteamDepotDownloaderGUI-${{ github.run_number }} + path: SteamDepotDownloaderGUI-${{ github.run_number }}*.{exe,AppImage,zip} \ No newline at end of file diff --git a/README.md b/README.md index 98c48e5d..9fece2c1 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,12 @@ ## How to setup dev environment * First, install `npm`, `nodejs` and Electron on your system. -> For Arch Linux users, run `sudo pacman -S npm nodejs` +> For Arch Linux users, run `sudo pacman -S npm nodejs electron` * Then, git clone this repo, change direcory into the repo and run `git checkout rewrite`. * Now run `npm install` * You now can start the GUI with `npm start` + +## Building +* cd into the repo +* `npm run build` \ No newline at end of file diff --git a/package.json b/package.json index 9e13bd03..acc56b5c 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,8 @@ "main": "main.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", - "start": "electron ." + "start": "electron .", + "build": "electron-builder -c electron-builder.yml -wl" }, "repository": { "type": "git",