-
Notifications
You must be signed in to change notification settings - Fork 1.9k
117 lines (102 loc) · 5.17 KB
/
ingestion_client.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
name: Build Ingestion Client Binaries
on:
push:
branches: ['main', 'master']
paths: ['samples/ingestion/ingestion-client/**', '.github/workflows/ingestion_client.yaml']
jobs:
build:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
- name: Get Release Versions
id: get_release_versions
run: |
set -u -e -o pipefail
version=$(cat ./samples/ingestion/ingestion-client/Setup/ArmTemplateBatch.json | jq -r .variables.Version)
versionRealtime=$(cat ./samples/ingestion/ingestion-client/Setup/ArmTemplateRealtime.json | jq -r .variables.Version)
echo version=$version >> "$GITHUB_OUTPUT"
echo "Batch template: ${version}"
echo versionRealtime=$versionRealtime >> "$GITHUB_OUTPUT"
echo "Realtime template: ${versionRealtime}"
- name: Verify Release Versions
if: steps.get_release_versions.outputs.version == '' || steps.get_release_versions.outputs.version != steps.get_release_versions.outputs.versionRealtime
uses: actions/github-script@v3
with:
script: |
core.setFailed('Invalid version specified or mismatching versions in batch and realtime.')
- name: Clean Solution
run: dotnet clean ./samples/ingestion/ingestion-client/BatchIngestionClient.sln --configuration Release && dotnet nuget locals all --clear
- name: Build BatchIngestionClient
run: dotnet build samples/ingestion/ingestion-client --configuration Release
- name: Publish StartTranscriptionByTimer function
run: dotnet publish -c Release -f net6.0 --no-self-contained --output ./StartTranscriptionByTimer samples/ingestion/ingestion-client/StartTranscriptionByTimer/StartTranscriptionByTimer.csproj
- name: Zip StartTranscriptionByTimer
run: cd StartTranscriptionByTimer && zip -r ../StartTranscriptionByTimer.zip *
- name: Publish StartTranscriptionByServiceBus function
run: dotnet publish -c Release -f net6.0 --no-self-contained --output ./StartTranscriptionByServiceBus samples/ingestion/ingestion-client/StartTranscriptionByServiceBus/StartTranscriptionByServiceBus.csproj
- name: Zip StartTranscriptionByServiceBus
run: cd StartTranscriptionByServiceBus && zip -r ../StartTranscriptionByServiceBus.zip *
- name: Publish FetchTranscription function
run: dotnet publish -c Release -f net6.0 --no-self-contained --output ./FetchTranscription samples/ingestion/ingestion-client/FetchTranscription/FetchTranscription.csproj
- name: Zip FetchTranscription
run: cd FetchTranscription && zip -r ../FetchTranscription.zip *
- name: Publish RealtimeTranscription function
run: dotnet publish -c Release -f net6.0 --no-self-contained --output ./RealtimeTranscription samples/ingestion/ingestion-client/RealtimeTranscription/RealtimeTranscription.csproj
- name: Zip RealtimeTranscription
run: cd RealtimeTranscription && zip -r ../RealtimeTranscription.zip *
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: 'ingestion-${{steps.get_release_versions.outputs.version}}'
release_name: 'Ingestion Client ${{steps.get_release_versions.outputs.version}}'
draft: false
prerelease: false
- name: Upload StartTranscriptionByTimer
id: upload-release-asset-0
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./StartTranscriptionByTimer.zip
asset_name: StartTranscriptionByTimer.zip
asset_content_type: application/zip
- name: Upload StartTranscriptionByServiceBus
id: upload-release-asset-1
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./StartTranscriptionByServiceBus.zip
asset_name: StartTranscriptionByServiceBus.zip
asset_content_type: application/zip
- name: Upload FetchTranscription
id: upload-release-asset-2
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./FetchTranscription.zip
asset_name: FetchTranscription.zip
asset_content_type: application/zip
- name: Upload RealtimeTranscription
id: upload-release-asset-3
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./RealtimeTranscription.zip
asset_name: RealtimeTranscription.zip
asset_content_type: application/zip