-
Notifications
You must be signed in to change notification settings - Fork 11
58 lines (42 loc) · 1.78 KB
/
build-nuget-packages.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 Okta.Xamarin nuget packages
on: [push]
jobs:
build-nuget-packages:
runs-on: macos-11
steps:
- uses: actions/checkout@v2
- name: Create artifacts directory
run: mkdir -p ./artifacts
- name: Set default Xamarin SDK versions
run: |
$VM_ASSETS/select-xamarin-sdk-v2.sh --mono=6.12 --ios=14.10
- name: Setup .NET Core SDK 6.0.x
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
- name: Nuget restore
run: |
nuget restore ./Okta.Xamarin/Okta.Xamarin/Okta.Xamarin.csproj &&
nuget restore ./Okta.Xamarin/Okta.Xamarin.iOS/Okta.Xamarin.iOS.csproj &&
nuget restore ./Okta.Xamarin/Okta.Xamarin.Android/Okta.Xamarin.Android.csproj &&
nuget restore ./Okta.Xamarin/Tests/Okta.Xamarin.Test/Okta.Xamarin.Test.csproj
- name: Run Unit Tests
working-directory: ./Okta.Xamarin/Tests/Okta.Xamarin.Test
run: dotnet test
- name: Build common (Okta.Xamarin) nuget package
run: nuget pack ./Okta.Xamarin/Okta.Xamarin/Okta.Xamarin.csproj -Build
- name: Build iOS (Okta.Xamarin.iOS) nuget package
run: nuget pack ./Okta.Xamarin/Okta.Xamarin.iOS/Okta.Xamarin.iOS.csproj -Build
- name: Build Android (Okta.Xamarin.Android) nuget package
run: nuget pack ./Okta.Xamarin/Okta.Xamarin.Android/Okta.Xamarin.Android.csproj -Build
- name: Copy nuget artifacts
run: mv *.nupkg `pwd`/artifacts
- name: Set GIT_COMMIT
run: echo "GIT_COMMIT=$(echo $GITHUB_SHA | cut -c 1-7)" >> $GITHUB_ENV
- name: Set artifacts path
run: echo "ARTIFACTS=`pwd`/artifacts" >> $GITHUB_ENV
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: Okta.Xamarin-ARTIFACTS-${{ env.GIT_COMMIT }}
path: ${{ env.ARTIFACTS }}