mirror of
https://github.com/ivabus/gui
synced 2025-06-07 15:50:27 +03:00
#99 test notification
This commit is contained in:
parent
cd95d79214
commit
f333deae9f
3 changed files with 31 additions and 5 deletions
27
.github/notify-slack.js
vendored
Executable file
27
.github/notify-slack.js
vendored
Executable file
|
@ -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>`
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
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();
|
7
.github/workflows/main.yml
vendored
7
.github/workflows/main.yml
vendored
|
@ -127,9 +127,8 @@ jobs:
|
|||
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
|
||||
uses: rtCamp/action-slack-notify@v2
|
||||
run: ./.github/notify-slack.js
|
||||
env:
|
||||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
|
||||
SLACK_USERNAME: GH_GUI_BOT
|
||||
SLACK_TITLE: LATEST BUILD {{matrix.platform}}
|
||||
SLACK_MESSAGE: download <s3://preview.gui.tea.xyz/release/tea_${{ steps.date.outputs.unix_seconds }}.${{ matrix.platform == 'ubuntu-latest' && 'deb' || 'dmg'}}|here>
|
||||
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'}}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "app"
|
||||
version = "0.1.0"
|
||||
description = "A tea.xyz desktop app to complete the cli"
|
||||
description = "A tea.xyz desktop app"
|
||||
authors = ["you"]
|
||||
license = ""
|
||||
repository = ""
|
||||
|
|
Loading…
Reference in a new issue