-
Notifications
You must be signed in to change notification settings - Fork 11
46 lines (41 loc) · 1.71 KB
/
Copy pathci.yml
File metadata and controls
46 lines (41 loc) · 1.71 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
46
name: .NET package CI
on: [workflow_dispatch]
# Least privilege: no step in this workflow writes to the repo,
# releases or packages via GITHUB_TOKEN (publishing uses NUGET_API_KEY,
# signing uses GCP_SA_KEY). Fail closed regardless of the org default.
permissions:
contents: read
defaults:
run:
working-directory: BrowserStackLocal
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@0717577d45739eb3c851188b29f50ed6c0b2194e # v2
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@c26a08ba26249b81327e26f6ef381897b6a8754d # v1.0.2
- name: Build BrowserStackLocal
run: |
msbuild BrowserStackLocal -t:restore -p:Configuration=Release
msbuild BrowserStackLocal -t:build -p:Configuration=Release
- name: Build Test project
run: |
msbuild BrowserStackLocalIntegrationTests -t:restore -p:Configuration=Release
msbuild BrowserStackLocalIntegrationTests -t:build -p:Configuration=Release
- name: Setup .NET Core
uses: actions/setup-dotnet@55ec9447dda3d1cf6bd587150f3262f30ee10815 # v3
with:
dotnet-version: 6.0.x
- name: Run Integration Tests
env:
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
run: dotnet test BrowserStackLocalIntegrationTests --no-build -p:Configuration=Release
- name: Pack NuGet Package
run: msbuild BrowserStackLocal -t:pack -p:Configuration=Release
- name: Save artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: BrowserStackLocal.nupkg
path: .\BrowserStackLocal\BrowserStackLocal\bin\Release\*.nupkg