-
Notifications
You must be signed in to change notification settings - Fork 1
/
teamsapp.yml
117 lines (100 loc) · 5.04 KB
/
teamsapp.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
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
# yaml-language-server: $schema=https://aka.ms/teams-toolkit/1.0.0/yaml.schema.json
#
# The teamsapp.yml composes automation tasks for Teams Toolkit when running other environment configurations.
# This file is used when selecting the Provision, Deploy, or Publish menu items in the Teams Toolkit for Visual Studio Code window
# or with the TeamsFx CLI commands.
# i.e. `teamsfx provision --env {environment name}` or `teamsfx deploy --env {environment name}`.
#
# You can customize this file. Visit https://aka.ms/teamsfx-v5.0-guide for more info about Teams Toolkit project files.
version: 1.0.0
environmentFolderPath: ./env
# Defines what the `provision` lifecycle step does with Teams Toolkit.
# Runs with the Provision menu or CLI using `teamsfx provision --env {environment name}`.
provision:
# Automates the creation of a Teams app registration and saves the App ID to an environment file.
- uses: teamsApp/create
with:
name: JARVIB-${{TEAMSFX_ENV}}
writeToEnvironmentFile:
teamsAppId: TEAMS_APP_ID
# Automates the creation an Azure AD app registration which is required for a bot.
# The Bot ID (AAD app client ID) and Bot Password (AAD app client secret) are saved to an environment file.
- uses: botAadApp/create
with:
name: JARVIB-${{TEAMSFX_ENV}}
writeToEnvironmentFile:
botId: BOT_ID
botPassword: SECRET_BOT_PASSWORD
# Automates the creation of infrastructure defined in ARM templates to host the bot.
# The created resource IDs are saved to an environment file.
- uses: arm/deploy
with:
subscriptionId: ${{AZURE_SUBSCRIPTION_ID}}
resourceGroupName: ${{AZURE_RESOURCE_GROUP_NAME}}
templates:
- path: ./infra/azure.bicep
parameters: ./infra/azure.parameters.json
deploymentName: Create-resources-for-tab
bicepCliVersion: v0.9.1
# Optional: Automates schema and error checking of the Teams app manifest and outputs the results in the console.
- uses: teamsApp/validateManifest
with:
manifestPath: ./appPackage/manifest.json
# Automates creating a final app package (.zip) by replacing any variables in the manifest.json file for the current environment.
- uses: teamsApp/zipAppPackage
with:
manifestPath: ./appPackage/manifest.json
outputZipPath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip
outputJsonPath: ./appPackage/build/manifest.${{TEAMSFX_ENV}}.json
# Optional: Automates an app package check for errors that would prevent the app from being published and reports any problems.
- uses: teamsApp/validateAppPackage
with:
appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip
# Automates updating the Teams app manifest in Teams Developer Portal using the App ID from the mainfest file.
# This action ensures that any manifest changes are reflected when launching the app again in Teams.
- uses: teamsApp/update
with:
appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip
# Defines what the `deploy` lifecycle step does with Teams Toolkit.
# Runs with the Deploy menu or CLI using `teamsfx deploy --env {environment name}`.
deploy:
- uses: script
with:
run: "yarn install"
timeout: 180000 # timeout in ms
- uses: script
with:
run: "yarn build"
timeout: 180000 # timeout in ms
# Deploy to an Azure App Service using the zip file created in the provision step.
- uses: azureAppService/zipDeploy
with:
artifactFolder: .
ignoreFile: .webappignore
# This example uses the env var thats generated by the arm/deploy action.
# You can replace it with an existing Azure Resource ID or other
# custom environment variable.
resourceId: ${{BOT_AZURE_APP_SERVICE_RESOURCE_ID}}
# Defines what the `publish` lifecycle step does with Teams Toolkit.
# Runs with the Deploy menu or CLI using `teamsfx publish --env {environment name}`.
publish:
# Optional: Automates schema and error checking of the Teams app manifest and outputs the results in the console.
- uses: teamsApp/validateManifest
with:
manifestPath: ./appPackage/manifest.json
# Automates creating a final app package (.zip) by replacing any variables in the manifest.json file for the current environment.
- uses: teamsApp/zipAppPackage
with:
manifestPath: ./appPackage/manifest.json
outputZipPath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip
outputJsonPath: ./appPackage/build/manifest.${{TEAMSFX_ENV}}.json
# Optional: Automates an app package check for errors that would prevent the app from being published and reports any problems.
- uses: teamsApp/validateAppPackage
with:
appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip
# Automates updating the Teams app manifest in Teams Developer Portal using the App ID from the mainfest file.
# This action ensures that any manifest changes are reflected when launching the app again in Teams.
- uses: teamsApp/update
with:
appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip
projectId: a6ef6a86-ec78-4cf0-bc78-4091921b6a7c