Skip to content

Commit 3903e6e

Browse files
author
Andrii Bondarchuk
committed
another try
1 parent f8fec6e commit 3903e6e

File tree

1 file changed

+14
-34
lines changed

1 file changed

+14
-34
lines changed

.github/workflows/FitSyncHubFunctions.yml

Lines changed: 14 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -9,52 +9,32 @@ env:
99
AZURE_FUNCTIONAPP_NAME: FitSyncHubFunctionsApp
1010
AZURE_FUNCTIONAPP_PACKAGE_PATH: src/FitSyncHub.Functions/published
1111
CONFIGURATION: Release
12-
DOTNET_CORE_VERSION: 9.0.x
12+
DOTNET_VERSION: 9.0.x
1313
WORKING_DIRECTORY: src/FitSyncHub.Functions
1414
jobs:
15-
build:
15+
build-and-deploy:
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/checkout@v4
18+
- name: 'Checkout GitHub Action'
19+
uses: actions/checkout@v4
1920

20-
- name: Setup .NET SDK
21+
- name: Setup DotNet ${{ env.DOTNET_VERSION }} Environment
2122
uses: actions/setup-dotnet@v4
2223
with:
23-
dotnet-version: ${{ env.DOTNET_CORE_VERSION }}
24+
dotnet-version: ${{ env.DOTNET_VERSION }}
2425

25-
- name: Restore
26-
run: dotnet restore "${{ env.WORKING_DIRECTORY }}"
27-
28-
- name: Build
29-
run: dotnet build "${{ env.WORKING_DIRECTORY }}" --configuration ${{ env.CONFIGURATION }} --no-restore
30-
31-
- name: Publish
32-
run: dotnet publish "${{ env.WORKING_DIRECTORY }}" --configuration ${{ env.CONFIGURATION }} --no-build --output "${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}"
33-
34-
- name: Publish Artifacts
35-
uses: actions/upload-artifact@v4
36-
with:
37-
name: functionapp
38-
path: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}
39-
include-hidden-files: true
40-
retention-days: 30
41-
deploy:
42-
runs-on: ubuntu-latest
43-
permissions:
44-
id-token: write #This is required for requesting the JWT
45-
needs: build
46-
steps:
47-
48-
- name: Download artifact from build job
49-
uses: actions/download-artifact@v4
50-
with:
51-
name: functionapp
52-
path: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}
26+
- name: 'Resolve Project Dependencies Using Dotnet'
27+
shell: bash
28+
run: |
29+
pushd './${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}'
30+
dotnet build --configuration Release --output ./output
31+
popd
5332
5433
- name: Deploy to Azure Function App
5534
uses: Azure/functions-action@v1
5635
id: fa
5736
with:
5837
app-name: ${{ env.AZURE_FUNCTIONAPP_NAME }}
59-
package: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}
38+
package: '${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}/output'
39+
sku: 'flexconsumption' # Parameter required when using a publish profile with Flex Consumption
6040
publish-profile: ${{ secrets.AZURE_FUNCTIONAPP_PUBLISH_PROFILE }}

0 commit comments

Comments
 (0)