From ba78bf25dc9ac4cb8b841a44dd66c895df9d5cb0 Mon Sep 17 00:00:00 2001 From: SrIzan10 <66965250+SrIzan10@users.noreply.github.com> Date: Sun, 25 Jun 2023 16:53:27 +0200 Subject: [PATCH] feat: github action --- .github/workflows/buildrelease.yml | 31 ++++++++++++++++++++++++++++++ .gitignore | 2 ++ package.json | 7 +------ yarn.lock | 8 ++++---- 4 files changed, 38 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/buildrelease.yml diff --git a/.github/workflows/buildrelease.yml b/.github/workflows/buildrelease.yml new file mode 100644 index 0000000..2adef6e --- /dev/null +++ b/.github/workflows/buildrelease.yml @@ -0,0 +1,31 @@ +name: Build/release + +on: push + +jobs: + release: + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [macos-latest, ubuntu-latest, windows-latest] + + steps: + - name: Check out Git repository + uses: actions/checkout@v1 + + - name: Install Node.js, NPM and Yarn + uses: actions/setup-node@v1 + with: + node-version: 18 + + - name: Build/release Electron app + uses: samuelmeuli/action-electron-builder@v1 + with: + # GitHub token, automatically provided to the action + # (No need to define this secret in the repo settings) + github_token: ${{ secrets.github_token }} + + # If the commit is tagged with a version (e.g. "v1.0.0"), + # release the app after building + release: ${{ startsWith(github.ref, 'refs/tags/v') }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 4d29575..6b3736e 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,5 @@ npm-debug.log* yarn-debug.log* yarn-error.log* + +dist/ diff --git a/package.json b/package.json index 8fa5fef..bb3505a 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,6 @@ "@mui/material": "^5.13.4", "axios": "^1.4.0", "colorette": "^2.0.20", - "electron": "^25.1.0", "electron-is-dev": "^2.0.0", "react": "^18.2.0", "react-dom": "^18.2.0", @@ -50,14 +49,10 @@ "last 1 safari version" ] }, - "build": { - "extraResources": [ - "./build/**" - ] - }, "devDependencies": { "@babel/plugin-proposal-private-property-in-object": "^7.21.11", "concurrently": "^8.2.0", + "electron": "^25.2.0", "electron-builder": "^24.4.0", "wait-on": "^7.0.1" } diff --git a/yarn.lock b/yarn.lock index ac0d81d..391f660 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4766,10 +4766,10 @@ electron-to-chromium@^1.4.411: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.426.tgz#077107b6565c081ce7d0a988fbce6d4ac2d49557" integrity sha512-dWuNH+XUT9hdFHASfMpcZGW5kUyJvllumJkXaXiswuCkoaFIFI89aykBPuHEi1YUWQGRCqvIO0BUdmeFJ4W4Ww== -electron@^25.1.0: - version "25.1.0" - resolved "https://registry.yarnpkg.com/electron/-/electron-25.1.0.tgz#78c79aba4bef941217c337dca46745b5551b5735" - integrity sha512-VKk4G/0euO7ysMKQKHXmI4d3/qR4uHsAtVFXK2WfQUVxBmc160OAm2R6PN9/EXmgXEioKQBtbc2/lvWyYpDbuA== +electron@^25.2.0: + version "25.2.0" + resolved "https://registry.yarnpkg.com/electron/-/electron-25.2.0.tgz#ff832d88f78481a82cf9feb72e605ec43553d4ba" + integrity sha512-I/rhcW2sV2fyiveVSBr2N7v5ZiCtdGY0UiNCDZgk2fpSC+irQjbeh7JT2b4vWmJ2ogOXBjqesrN9XszTIG6DHg== dependencies: "@electron/get" "^2.0.0" "@types/node" "^18.11.18"