Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

windows-dotnet-functionapp-on-azure.yml refactor and .NET update #126

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 25 additions & 9 deletions FunctionApp/windows-dotnet-functionapp-on-azure.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,46 @@
name: Deploy DotNet project to Azure Function App
# What this script will do:
# 1. Download the repo
# checkout: https://github.com/actions/checkout
# 2. Download and install .NET
# setup-dotnet: https://github.com/actions/setup-dotnet
# 3. Build the code
# https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-build
# 4. Publish to Azure
# function-action: https://github.com/Azure/functions-action

on:
[push]
#BEWARE
#Any function that is already published in the Function App will be replaced

# CONFIGURATION
# For help, go to https://github.com/Azure/Actions
#
# 1. Set up the following secrets in your repository:
# 1. Get the publish profile value following this tutorial here:
# https://github.com/Azure/functions-action#using-publish-profile-as-deployment-credential-recommended
# 2. Set up the publish profile value as a secret in your repository with the name:
# AZURE_FUNCTIONAPP_PUBLISH_PROFILE
#
# 2. Change these variables for your configuration:
# 3. In the "env" settings, change the "your-app-name" to the name of your Azure Function App
# 4. If you are using a different envirement on Github, set in the "environment" value inside "jobs"

name: Deploy DotNet project to Azure Function App

on:
[push]

env:
AZURE_FUNCTIONAPP_NAME: your-app-name # set this to your application's name
AZURE_FUNCTIONAPP_PACKAGE_PATH: '.' # set this to the path to your web app project, defaults to the repository root
DOTNET_VERSION: '2.2.402' # set this to the dotnet version to use
DOTNET_VERSION: '6.0.x' # set this to the dotnet version to use

jobs:
build-and-deploy:
runs-on: windows-latest
environment: dev
environment: dev
steps:
- name: 'Checkout GitHub Action'
uses: actions/checkout@master

- name: Setup DotNet ${{ env.DOTNET_VERSION }} Environment
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v2
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

Expand Down