teamsapp.local.yml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. # yaml-language-server: $schema=https://aka.ms/teams-toolkit/1.0.0/yaml.schema.json
  2. # Visit https://aka.ms/teamsfx-v5.0-guide for details on this file
  3. # Visit https://aka.ms/teamsfx-actions for details on actions
  4. version: 1.0.0
  5. provision:
  6. # Creates a Teams app
  7. - uses: teamsApp/create
  8. with:
  9. # Teams app name
  10. name: share${{APP_NAME_SUFFIX}}
  11. # Write the information of created resources into environment file for
  12. # the specified environment variable(s).
  13. writeToEnvironmentFile:
  14. teamsAppId: TEAMS_APP_ID
  15. # Set TAB_DOMAIN and TAB_ENDPOINT for local launch
  16. - uses: script
  17. with:
  18. run:
  19. echo "::set-teamsfx-env TAB_DOMAIN=localhost:53000";
  20. echo "::set-teamsfx-env TAB_ENDPOINT=https://localhost:53000";
  21. # Validate using manifest schema
  22. - uses: teamsApp/validateManifest
  23. with:
  24. # Path to manifest template
  25. manifestPath: ./appPackage/manifest.json
  26. # Build Teams app package with latest env value
  27. - uses: teamsApp/zipAppPackage
  28. with:
  29. # Path to manifest template
  30. manifestPath: ./appPackage/manifest.json
  31. outputZipPath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip
  32. outputJsonPath: ./appPackage/build/manifest.${{TEAMSFX_ENV}}.json
  33. # Validate app package using validation rules
  34. - uses: teamsApp/validateAppPackage
  35. with:
  36. # Relative path to this file. This is the path for built zip file.
  37. appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip
  38. # Apply the Teams app manifest to an existing Teams app in
  39. # Teams Developer Portal.
  40. # Will use the app id in manifest file to determine which Teams app to update.
  41. - uses: teamsApp/update
  42. with:
  43. # Relative path to this file. This is the path for built zip file.
  44. appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip
  45. # Extend your Teams app to Outlook and the Microsoft 365 app
  46. - uses: teamsApp/extendToM365
  47. with:
  48. # Relative path to the build app package.
  49. appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip
  50. # Write the information of created resources into environment file for
  51. # the specified environment variable(s).
  52. writeToEnvironmentFile:
  53. titleId: M365_TITLE_ID
  54. appId: M365_APP_ID
  55. deploy:
  56. # Install development tool(s)
  57. - uses: devTool/install
  58. with:
  59. devCert:
  60. trust: true
  61. # Write the information of installed development tool(s) into environment
  62. # file for the specified environment variable(s).
  63. writeToEnvironmentFile:
  64. sslCertFile: SSL_CRT_FILE
  65. sslKeyFile: SSL_KEY_FILE
  66. # Run npm command
  67. - uses: cli/runNpmCommand
  68. name: install dependencies
  69. with:
  70. args: install --no-audit
  71. # Generate runtime environment variables
  72. - uses: file/createOrUpdateEnvironmentFile
  73. with:
  74. target: ./.localConfigs
  75. envs:
  76. PORT: 53000
  77. SSL_CRT_FILE: ${{SSL_CRT_FILE}}
  78. SSL_KEY_FILE: ${{SSL_KEY_FILE}}