diff --git a/.github/notify-slack.js b/.github/notify-slack.js new file mode 100755 index 0000000..0b96f7b --- /dev/null +++ b/.github/notify-slack.js @@ -0,0 +1,27 @@ +#!/usr/bin/env node + +async function main() { + + const message = { + blocks: [ + { + type: 'section', + text: { + type: 'mrkdwn', + text: `NEW BUILD FOR ${process.env.PLATFORM} <${process.env.DOWNLOAD_URL}|download ${process.env.VERSION || ''}>` + } + } + ] + } + const res = fetch(process.env.SLACK_WEBHOOK, { + method: 'POST', + body: JSON.stringify(message), + headers: { 'Content-Type': 'application/json' } + }) + if (res.ok) { + const data = await res.json(); + console.log(data); + } +} + +main(); \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 539942e..799a00f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,7 +53,7 @@ jobs: - name: setup node uses: actions/setup-node@v1 with: - node-version: 16 + node-version: 18 cache: 'pnpm' cache-dependency-path: pnpm-lock.yaml - name: install app dependencies @@ -74,7 +74,7 @@ jobs: - name: setup node uses: actions/setup-node@v1 with: - node-version: 16 + node-version: 18 cache: 'pnpm' cache-dependency-path: pnpm-lock.yaml - name: install Rust stable diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3fdaf7f..9d5b56a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -41,7 +41,7 @@ jobs: - name: setup node uses: actions/setup-node@v1 with: - node-version: 16 + node-version: 18 cache: 'pnpm' cache-dependency-path: pnpm-lock.yaml - name: install Rust stable @@ -73,7 +73,7 @@ jobs: - name: setup node uses: actions/setup-node@v1 with: - node-version: 16 + node-version: 18 cache: 'pnpm' cache-dependency-path: pnpm-lock.yaml - name: install Rust stable @@ -126,4 +126,9 @@ jobs: run: | aws s3 cp ./modules/gui/src-tauri/target/release/bundle/deb/tea_0.1.0_amd64.deb \ s3://preview.gui.tea.xyz/release/tea_${{ steps.date.outputs.unix_seconds }}.deb - + - name: Slack Notification + run: ./.github/notify-slack.js + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} + PLATFORM: ${{ matrix.platform }} + DOWNLOAD_URL: http://preview.gui.tea.xyz.s3-website-us-east-1.amazonaws.com/release/tea_${{ steps.date.outputs.unix_seconds }}.${{ matrix.platform == 'ubuntu-latest' && 'deb' || 'dmg'}} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 24366a2..3180c21 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,7 +20,7 @@ jobs: - name: setup node uses: actions/setup-node@v1 with: - node-version: 16 + node-version: 18 cache: 'pnpm' cache-dependency-path: pnpm-lock.yaml - name: install Rust stable @@ -80,4 +80,11 @@ jobs: aws s3 cp ./modules/gui/src-tauri/target/release/bundle/dmg/tea_0.1.0_x64.dmg \ s3://preview.gui.tea.xyz/release/tea_gui_latest.${{matrix.platform}}.dmg aws s3 cp ./modules/gui/src-tauri/target/release/bundle/dmg/tea_0.1.0_x64.dmg \ - s3://preview.gui.tea.xyz/release/tea_gui_${{steps.tag.outputs.tag}}.${{matrix.platform}}.dmg \ No newline at end of file + s3://preview.gui.tea.xyz/release/tea_gui_${{steps.tag.outputs.tag}}.${{matrix.platform}}.dmg + - name: Slack Notification + run: ./.github/notify-slack.js + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} + PLATFORM: ${{ matrix.platform }} + VERSION: ${{steps.tag.outputs.tag}} + DOWNLOAD_URL: http://preview.gui.tea.xyz.s3-website-us-east-1.amazonaws.com/release/tea_gui_${{steps.tag.outputs.tag}}.${{matrix.platform}}.${{ matrix.platform == 'ubuntu-latest' && 'deb' || 'dmg'}} diff --git a/modules/gui/src-tauri/Cargo.toml b/modules/gui/src-tauri/Cargo.toml index 6576123..c3b3582 100644 --- a/modules/gui/src-tauri/Cargo.toml +++ b/modules/gui/src-tauri/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "app" version = "0.1.0" -description = "A tea.xyz desktop app" +description = "A tea.xyz desktop app " authors = ["you"] license = "" repository = "" diff --git a/modules/gui/src-tauri/icons/icon.icns b/modules/gui/src-tauri/icons/icon.icns index 7a3d92c..46b77f8 100644 Binary files a/modules/gui/src-tauri/icons/icon.icns and b/modules/gui/src-tauri/icons/icon.icns differ diff --git a/modules/gui/src-tauri/icons/icon.ico b/modules/gui/src-tauri/icons/icon.ico index 68d8501..3bfde41 100644 Binary files a/modules/gui/src-tauri/icons/icon.ico and b/modules/gui/src-tauri/icons/icon.ico differ