-
-
Notifications
You must be signed in to change notification settings - Fork 1
35 lines (24 loc) · 1.06 KB
/
PullRequest.yml
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
name: Pull Request
on: pull_request
env:
DOTNET_NOLOGO: true
jobs:
build_release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Build version prefix/suffix
run: |
echo "VERSION_PREFIX=$(( 100 + ${{ github.run_number }} )).0.0" >> $GITHUB_ENV
echo "VERSION_SUFFIX=alpha" >> $GITHUB_ENV
- name: Setup .NET
uses: actions/setup-dotnet@v3
- run: dotnet restore --verbosity minimal
- run: dotnet build --configuration Release -p:ContinuousIntegrationBuild=true -p:DebugType=Embedded -p:VersionPrefix=$VERSION_PREFIX --version-suffix $VERSION_SUFFIX
- run: dotnet pack --configuration Release --no-build --output ./artifacts -p:DebugType=Embedded -p:VersionPrefix=$VERSION_PREFIX --version-suffix $VERSION_SUFFIX
- name: Publish artifacts
uses: actions/upload-artifact@v3
with:
name: NuGetPackage.${{ env.VERSION_PREFIX }}-${{ env.VERSION_SUFFIX }}
path: ./artifacts/