Skip to content

Commit a64685c

Browse files
committed
split two separate file
1 parent 76cafe1 commit a64685c

File tree

2 files changed

+44
-3
lines changed

2 files changed

+44
-3
lines changed

.github/workflows/build.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: "Build and Test"
2+
on:
3+
push:
4+
branches: [main]
5+
pull_request:
6+
branches: [main]
7+
8+
env:
9+
SOLUTION_FILE: ValueMapper/ValueMapper.sln
10+
PROJECT_PATH: ValueMapper/ValueMapperCore/ValueMapper.csproj
11+
12+
jobs:
13+
build:
14+
name: "Build"
15+
runs-on: "windows-latest"
16+
steps:
17+
- name: "Checkout"
18+
uses: actions/checkout@v3
19+
20+
- name: "Install dotnet"
21+
uses: actions/setup-dotnet@v3
22+
with:
23+
dotnet-version: "8.0.x"
24+
25+
- name: "Restore packages"
26+
run: dotnet restore ${{ env.SOLUTION_FILE }}
27+
28+
- name: "Build project"
29+
run: dotnet build ${{ env.SOLUTION_FILE }} --no-restore --configuration Release
30+
31+
- name: "Run tests"
32+
run: dotnet test ${{ env.SOLUTION_FILE }} --no-build --configuration Release

.github/workflows/ci.yml renamed to .github/workflows/release.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,45 @@
1-
name: "Deploy to NuGet"
1+
name: "Release to NuGet"
22
on:
33
push:
44
tags:
55
- "v*"
6+
67
env:
78
SOLUTION_FILE: ValueMapper/ValueMapper.sln
89
PROJECT_PATH: ValueMapper/ValueMapperCore/ValueMapper.csproj
910
PACKAGE_OUTPUT_DIRECTORY: D:/a/ValueMapper/ValueMapper/output
1011
NUGET_SOURCE_URL: "https://api.nuget.org/v3/index.json"
12+
1113
jobs:
12-
deploy:
13-
name: "Deploy"
14+
release:
15+
name: "Release"
1416
runs-on: "windows-latest"
1517
steps:
1618
- name: "Checkout"
1719
uses: actions/checkout@v3
20+
1821
- name: "Install dotnet"
1922
uses: actions/setup-dotnet@v3
2023
with:
2124
dotnet-version: "8.0.x"
25+
2226
- name: "Restore packages"
2327
run: dotnet restore ${{ env.SOLUTION_FILE }}
28+
2429
- name: "Build project"
2530
run: dotnet build ${{ env.SOLUTION_FILE }} --no-restore --configuration Release
31+
2632
- name: "Get Version"
2733
id: version
2834
uses: battila7/get-version-action@v2
35+
2936
- name: "Pack project"
3037
run: dotnet pack ${{ env.PROJECT_PATH }} --no-restore --no-build --configuration Release --include-symbols -p:PackageVersion=${{ steps.version.outputs.version-without-v }} --output ${{ env.PACKAGE_OUTPUT_DIRECTORY }}
38+
3139
- name: "List package directory contents"
3240
run: dir "${{ env.PACKAGE_OUTPUT_DIRECTORY }}"
3341
shell: cmd
42+
3443
- name: "Push packages with PowerShell"
3544
shell: pwsh
3645
run: |

0 commit comments

Comments
 (0)