bump version #65
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: API Build and Deploy | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- src/API/** | |
env: | |
AZURE_WEBAPP_NAME: elf-ediwang | |
AZURE_WEBAPP_PACKAGE_PATH: '.' | |
DOTNET_VERSION: '8.0.x' | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Checkout GitHub Action' | |
uses: actions/checkout@master | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: ${{ env.DOTNET_VERSION }} | |
- name: dotnet build and publish | |
working-directory: ./src/API | |
run: | | |
dotnet build --configuration Release | |
dotnet publish -c Release --no-build -o '${{ env.AZURE_WEBAPP_PACKAGE_PATH }}/elfapi' | |
- name: 'Run Azure webapp deploy action using publish profile credentials' | |
uses: azure/webapps-deploy@v3 | |
with: | |
app-name: ${{ env.AZURE_WEBAPP_NAME }} # Replace with your app name | |
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} # Define secret variable in repository settings as per action documentation | |
package: '${{ env.AZURE_WEBAPP_PACKAGE_PATH }}/src/API/elfapi' |