From 34f0e2a64d9ca00b622e5014c05b06d0afd3cf0a Mon Sep 17 00:00:00 2001 From: BluDood Date: Wed, 23 Oct 2024 21:51:56 +0200 Subject: [PATCH] fix: client node types, github build actions --- .github/workflows/build-client.yml | 37 ----------------- .github/workflows/build-desktop.yml | 33 --------------- .github/workflows/build-release.yml | 64 +++++++++++++++++++++++++++++ client/package-lock.json | 22 +++++++++- client/package.json | 3 +- 5 files changed, 86 insertions(+), 73 deletions(-) delete mode 100644 .github/workflows/build-client.yml delete mode 100644 .github/workflows/build-desktop.yml create mode 100644 .github/workflows/build-release.yml diff --git a/.github/workflows/build-client.yml b/.github/workflows/build-client.yml deleted file mode 100644 index 7296a7c..0000000 --- a/.github/workflows/build-client.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Build GlanceThing Client and attach to release - -on: - workflow_dispatch: - - # release: - # types: [created] - -jobs: - build: - runs-on: ubuntu-latest - defaults: - run: - working-directory: ./client - - steps: - - name: Checkout the repository - uses: actions/checkout@v4 - - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: '20' - - - name: Install dependencies - run: npm ci - - - name: Build the project - run: npm run build - - - name: Zip the build output - run: zip -r glancething-client.zip dist/* - - # - name: Upload the zip to the GitHub Release - # uses: softprops/action-gh-release@v2 - # with: - # files: glancething-client.zip diff --git a/.github/workflows/build-desktop.yml b/.github/workflows/build-desktop.yml deleted file mode 100644 index 4146cfd..0000000 --- a/.github/workflows/build-desktop.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Build Desktop Application and Attach to Release - -on: - workflow_dispatch: - # release: - # types: [created] - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Checkout the repository - uses: actions/checkout@v3 - - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - node-version: '20' - - - name: Install Wine - run: sudo apt update && sudo apt install wine64 -y - - - name: Install dependencies - run: npm ci - - - name: Build the project - run: npm run build:win - - # - name: Upload the zip to the GitHub Release - # uses: softprops/action-gh-release@v2 - # with: - # files: glancething-*-setup.exe diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml new file mode 100644 index 0000000..a60c1d7 --- /dev/null +++ b/.github/workflows/build-release.yml @@ -0,0 +1,64 @@ +name: Build GlanceThing and attach to release + +on: + release: + types: [created] + +jobs: + build-desktop: + runs-on: ubuntu-latest + + steps: + - name: Checkout the repository + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Install Wine + run: | + sudo dpkg --add-architecture i386 + sudo apt-get update + sudo apt-get install wine64 wine32 -y + + - name: Install dependencies + run: npm ci + + - name: Build the project + run: npm run build:win + + - name: Upload the zip to the GitHub Release + uses: softprops/action-gh-release@v2 + with: + files: ./dist/glancething-*-setup.exe + + build-client: + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./client + + steps: + - name: Checkout the repository + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Install dependencies + run: npm ci + + - name: Build the project + run: npm run build + + - name: Zip the build output + run: zip -r /tmp/glancething-client-${GITHUB_REF_NAME}.zip dist/* + + - name: Upload the zip to the GitHub Release + uses: softprops/action-gh-release@v2 + with: + files: /tmp/glancething-client-*.zip diff --git a/client/package-lock.json b/client/package-lock.json index e23cbd8..880fd21 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -1,12 +1,12 @@ { "name": "glancethingclient", - "version": "1.0.0", + "version": "0.0.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "glancethingclient", - "version": "1.0.0", + "version": "0.0.1", "dependencies": { "@fontsource-variable/open-sans": "^5.1.0", "@fontsource/material-icons": "^5.1.0", @@ -16,6 +16,7 @@ }, "devDependencies": { "@eslint/js": "^9.9.0", + "@types/node": "^22.7.9", "@types/react": "^18.3.3", "@types/react-dom": "^18.3.0", "@vitejs/plugin-legacy": "^5.4.2", @@ -2809,6 +2810,16 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/node": { + "version": "22.7.9", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.9.tgz", + "integrity": "sha512-jrTfRC7FM6nChvU7X2KqcrgquofrWLFDeYC1hKfwNWomVvrn7JIksqf344WN2X/y8xrgqBd2dJATZV4GbatBfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.19.2" + } + }, "node_modules/@types/prop-types": { "version": "15.7.13", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.13.tgz", @@ -5121,6 +5132,13 @@ } } }, + "node_modules/undici-types": { + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "dev": true, + "license": "MIT" + }, "node_modules/unicode-canonical-property-names-ecmascript": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.1.tgz", diff --git a/client/package.json b/client/package.json index 35d730e..aeffce2 100644 --- a/client/package.json +++ b/client/package.json @@ -18,6 +18,7 @@ }, "devDependencies": { "@eslint/js": "^9.9.0", + "@types/node": "^22.7.9", "@types/react": "^18.3.3", "@types/react-dom": "^18.3.0", "@vitejs/plugin-legacy": "^5.4.2", @@ -30,4 +31,4 @@ "typescript-eslint": "^8.0.1", "vite": "^5.4.1" } -} \ No newline at end of file +}