-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (39 loc) · 1.22 KB
/
wf-samples-build.yaml
File metadata and controls
45 lines (39 loc) · 1.22 KB
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
41
42
43
44
45
name: wf-samples-build
run-name: Build sample app
on:
workflow_call:
inputs:
appName:
description: "App name"
type: string
default: "sample-app"
jobs:
build:
name: Build & Publish ${{ inputs.appName }} app
runs-on: ubuntu-latest
env:
APP_NAME: ${{ inputs.appName }}
PUBLISH_DIR: ${{ github.workspace }}/publish
SOLUTION_FILE: InvvardDev.Ifttt.Samples.sln
steps:
- name: Checkout Samples directory
uses: actions/checkout@v4
with:
sparse-checkout: samples
sparse-checkout-cone-mode: false
- name: Set up .NET Core
uses: actions/setup-dotnet@v4.0.0
with:
dotnet-version: 8.0.x
dotnet-quality: ga
- name: Build & Publish ${{ env.APP_NAME }}
run: |
dotnet restore ${{ env.SOLUTION_FILE }}
dotnet build ${{ env.SOLUTION_FILE }} --configuration Release --no-restore
dotnet publish --no-build --property:PublishDir=${{ env.PUBLISH_DIR }}/
working-directory: samples
- name: Upload artifact for deployment job
uses: actions/upload-artifact@v4
with:
name: ${{ env.APP_NAME }}
path: ${{ env.PUBLISH_DIR }}