-
-
Notifications
You must be signed in to change notification settings - Fork 9
40 lines (35 loc) · 1.2 KB
/
NanoFramework-GitHubBot.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
# Copyright (c) .NET Foundation and Contributors
# See LICENSE file in the project root for full license information.
name: Build and deploy nanoFramework GitHubBot
on:
push:
branches:
- main
paths:
- github-nfbot/GitHub-nfbot/**
env:
AZURE_FUNCTIONAPP_NAME: NanoFramework-GitHubBot
AZURE_FUNCTIONAPP_PACKAGE_PATH: .\published
CONFIGURATION: Release
DOTNET_VERSION: '6.0.x'
WORKING_DIRECTORY: .
DOTNET_CORE_VERSION_INPROC: ''
jobs:
build-and-deploy:
runs-on: windows-latest
steps:
- name: 'Checkout GitHub Action'
uses: actions/checkout@v4
- name: Setup DotNet ${{ env.DOTNET_VERSION }} Environment
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Build Azure Function
run: |
dotnet build "github-nfbot/GitHub-nfbot" --configuration ${{ env.CONFIGURATION }} --output "${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}"
- name: Deploy to Azure Function App
uses: Azure/functions-action@v1
with:
app-name: ${{ env.AZURE_FUNCTIONAPP_NAME }}
publish-profile: ${{ secrets.NANOFRAMEWORK_GITHUBBOT_FFFF }}
package: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}