-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (37 loc) · 1.38 KB
/
deploy.yml
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
name: Deploy
on:
release:
types:
- published
jobs:
publish:
name: Publish
env:
BW_PROJECT_NAME: Bandwidth.Standard
BW_PROJECT_TEST_NAME: Bandwidth.StandardTests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set release version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
- uses: actions/setup-dotnet@v3
with:
dotnet-version: "6.0"
- name: Run integration tests
env:
BW_ACCOUNT_ID: ${{ secrets.BW_ACCOUNT_ID }}
BW_USERNAME: ${{ secrets.BW_USERNAME }}
BW_PASSWORD: ${{ secrets.BW_PASSWORD }}
BW_VOICE_APPLICATION_ID: ${{ secrets.BW_VOICE_APPLICATION_ID }}
BW_MESSAGING_APPLICATION_ID: ${{ secrets.BW_MESSAGING_APPLICATION_ID }}
BW_NUMBER: ${{ secrets.BW_NUMBER }}
USER_NUMBER: ${{ secrets.USER_NUMBER }}
BASE_CALLBACK_URL: ${{ secrets.BASE_CALLBACK_URL }}
run: dotnet test $BW_PROJECT_TEST_NAME
- name: Pack NuGet package
run: dotnet pack --configuration Release $BW_PROJECT_NAME -p:PackageVersion=$RELEASE_VERSION
- name: Publish NuGet package
env:
NUGET_KEY: ${{ secrets.NUGET_KEY }}
NUGET_SOURCE: https://api.nuget.org/v3/index.json
run: dotnet nuget push $BW_PROJECT_NAME/bin/Release/*.nupkg -s $NUGET_SOURCE -k $NUGET_KEY