-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (42 loc) · 1.75 KB
/
build-test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Build and Test
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build Test Image
run: docker build -t client-cs:latest -f ./dockerfile.test .
- name: Run Test Image
run: docker run --rm client-cs:latest
- name: Setup Dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Build API Package
run: cd Vements/API && dotnet build -c Release /property:Version="$(echo $GITHUB_REF_NAME | sed 's/v//')"
- name: Publish API Package
run: cd Vements/API && dotnet nuget push bin/Release/*.nupkg -k $NUGET_AUTH_TOKEN -s https://api.nuget.org/v3/index.json --skip-duplicate
env:
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_TOKEN }}
- name: Build CLI Package
run: cd Vements/CLI && dotnet build -c Release /property:Version="$(echo $GITHUB_REF_NAME | sed 's/v//')"
- name: Publish CLI Package
run: cd Vements/CLI && dotnet nuget push bin/Release/*.nupkg -k $NUGET_AUTH_TOKEN -s https://api.nuget.org/v3/index.json --skip-duplicate
env:
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_TOKEN }}
- name: Send Telegram Notification
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
message: |
${{github.workflow}}
repository: ${{ github.repository }}
user: ${{ github.actor }}
commit: ${{ github.event.head_commit.message }}
link: https://github.com/${{ github.repository }}
link: https://github.com/${{ github.repository }}/commit/${{github.sha}}