-
Notifications
You must be signed in to change notification settings - Fork 9
58 lines (48 loc) · 1.44 KB
/
build.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
name: Build SDK
on:
push:
branches: [ "main", "devel" ]
pull_request:
branches: [ "main", "devel" ]
pull_request_target:
branches: [ "main", "devel" ]
workflow_dispatch:
inputs:
branch:
description: 'Branch to build'
required: true
default: 'main'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Ensure PowerShell config directory exists
- name: Ensure PowerShell config directory exists
run: mkdir -p /home/runner/.config/powershell
shell: bash
# Create the service account file from the secret
- name: Create Service Account File
run: |
echo '${{ secrets.RSC_SERVICE_ACCOUNT_JSON }}' > ${{ github.workspace }}/service_account.json
shell: bash
# Install PowerShell
- name: Install PowerShell
run: |
# Update the list of products
sudo apt-get update
# Install a basic PowerShell environment
sudo apt-get install -y powershell
# Setup .NET
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
# Build SDK
- name: Build SDK
run: pwsh -NoProfile -NonInteractive -File Utils/Build-RscSdk.ps1 -NoTests -CI
# Test SDK
- name: Test SDK
env:
RSC_SERVICE_ACCOUNT_FILE: ${{ github.workspace }}/service_account.json
run: pwsh -NoProfile -NonInteractive -File Utils/Test-RscSdk.ps1 -CI