Skip to content

Commit c9178f5

Browse files
authored
Create build-Build-AHK.GradeManagement.yml
1 parent 7edca45 commit c9178f5

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Build AHK.GradeManagement
2+
3+
on:
4+
pull_request:
5+
branches: dev # Run workflow on PRs to the main branch.
6+
7+
# Run workflow on pushes to any branch, except the main branch.
8+
# push:
9+
# branches-ignore: main
10+
11+
# Allows you to run this workflow manually from the Actions tab.
12+
workflow_dispatch:
13+
14+
# 👇 Allows this workflow to be called from the deployment workflow, but the parameters must be provided.
15+
workflow_call:
16+
inputs:
17+
artifactName:
18+
description: The name of the artifact to upload to.
19+
required: true
20+
type: string
21+
22+
env:
23+
# 👇 Provide a default artifact name for when this workflow is not called by the deployment workflow.
24+
artifactName: ${{ inputs.artifactName || 'buildArtifact' }}
25+
26+
jobs:
27+
build-and-test:
28+
runs-on: ubuntu-latest
29+
steps:
30+
- name: Checkout the repo source code
31+
uses: actions/checkout@v3
32+
33+
- name: Setup dotnet
34+
uses: actions/setup-dotnet@v1
35+
with:
36+
dotnet-version: "9.0.x"
37+
38+
- name: "Run dotnet restore"
39+
working-directory: src/Ahk.GradeManagement
40+
run: dotnet restore Ahk.GradeManagement.sln
41+
42+
- name: "Run dotnet publish"
43+
working-directory: src/Ahk.GradeManagement
44+
run: dotnet publish Ahk.GradeManagement.Api/Ahk.GradeManagement.Api.csproj --configuration Release --output ./output/Ahk.GradeManagement.Api
45+
46+
- name: Upload artifact
47+
uses: actions/upload-artifact@v4
48+
with:
49+
name: ${{ env.artifactName }}
50+
path: ./output # Put the path to the build artifact files directory here.

0 commit comments

Comments
 (0)