-
Notifications
You must be signed in to change notification settings - Fork 3
70 lines (57 loc) · 2.2 KB
/
dev.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#dev.yml
name: Compile and run tests
on:
push:
# this will cause the action to run on pushes to branches that start with the prefixes specified here
branches: [ dev ]
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
pull_request:
# we'll also run this when pull requests to dev are opened
branches: [ dev ]
jobs:
Build:
# The type of runner that the job will run on
runs-on: windows-latest
env:
Solution_Name: BsddRevitPlugin.sln
outputs:
Version: ${{ steps.gitversion.outputs.nuGetVersionV2 }}
CommitsSinceVersionSource: ${{ steps.gitversion.outputs.CommitsSinceVersionSource }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
# install and calculate the new version with GitVersion
- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: '5.5.0'
- name: Determine Version
uses: gittools/actions/gitversion/[email protected]
with:
useConfigFile: true
configFilePath: GitVersion.yml
id: gitversion # step id used as reference for output values
- name: Display GitVersion outputs
run: |
echo "MajorMinorPatch: ${{ steps.gitversion.outputs.majorMinorPatch }}"
echo "NuGetVersionV2: ${{ steps.gitversion.outputs.nuGetVersionV2 }}"
echo "CommitsSinceVersionSource: ${{ steps.gitversion.outputs.CommitsSinceVersionSource }}"
- name: Setup MSBuild.exe
uses: microsoft/[email protected]
- name: Setup NuGet
uses: NuGet/[email protected]
- name: Restore NuGet packages
run: |
dotnet nuget add source "https://nuget.pkg.github.com/ASRRtechnologies/index.json" --name "GitHub ASRR" --username "jcathalina" --password "${{ secrets.GITHUB_TOKEN }}" --store-password-in-clear-text
nuget restore $env:Solution_Name
- name: Run MSBuild
id: run-msbuild
run: |
msbuild $env:Solution_Name /t:Clean,Build /p:platform="x64" /p:Configuration=Release
- name: Run tests
id: run-tests
run: |
dotnet test