Skip to content

added build + publish steps to build + test workflow 12/x. #23

added build + publish steps to build + test workflow 12/x.

added build + publish steps to build + test workflow 12/x. #23

Workflow file for this run

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}}