AquaDX/.github/workflows/aquamai.yaml

49 lines
1.2 KiB
YAML
Raw Normal View History

2024-08-16 18:44:58 +08:00
name: Build AquaMai
on:
workflow_dispatch:
push:
paths:
- AquaMai/**
branches:
- v1-dev
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Checkout Assets
2024-09-02 23:50:05 +08:00
uses: clansty/checkout@main
2024-08-16 18:44:58 +08:00
with:
repository: clansty/AquaMai-Build-Assets
ssh-key: ${{ secrets.BUILD_ASSETS_KEY }}
path: build-assets
2024-09-02 23:50:05 +08:00
max-attempts: 50
min-retry-interval: 1
max-retry-interval: 5
2024-08-16 18:44:58 +08:00
- name: Build AquaMai
shell: cmd
run: |
2024-10-14 02:05:23 +08:00
copy /y build-assets\SDEZ\* AquaMai\Libs
2024-08-16 18:44:58 +08:00
cd AquaMai
2024-10-14 02:05:23 +08:00
dotnet build -c Release
2024-08-16 18:44:58 +08:00
- uses: actions/upload-artifact@v4
with:
2024-10-14 02:05:23 +08:00
name: AquaMai
2024-08-16 18:44:58 +08:00
path: AquaMai\Output\AquaMai.dll
- name: Send to Telegram
if: github.event_name != 'pull_request'
2024-08-16 18:44:58 +08:00
run: |
$Uri = "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendDocument"
$Form = @{
chat_id = "-1002231087502"
2024-10-14 02:05:23 +08:00
caption = "${{ github.event.commits[0].message }}"
2024-08-16 18:44:58 +08:00
document = Get-Item AquaMai\Output\AquaMai.dll
}
Invoke-RestMethod -Uri $uri -Form $Form -Method Post