-
Notifications
You must be signed in to change notification settings - Fork 12
56 lines (45 loc) · 1.37 KB
/
ci.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
name: CI build
env:
OUTPUT_PATH: ${{ github.workspace }}/.nupkg
DOTNET_VERSION: "6.0.x"
GITHUB_SOURCE: "https://nuget.pkg.github.com/aaronpowell/index.json"
CONFIGURATION: "Debug"
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Dotnet ${{ env.DOTNET_VERSION }}
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Restore dotnet tools
run: dotnet tool restore
- name: Generate packages
run: dotnet fake run ./build.fsx --target CI
- name: Publish release packages
uses: actions/upload-artifact@v3
with:
name: packages
path: ${{ env.OUTPUT_PATH }}
publish-github:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
name: packages
path: ${{ env.OUTPUT_PATH }}
- name: Setup .NET Core ${{ env.DOTNET_VERSION }}
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Publish
run: dotnet nuget push --api-key ${{ secrets.GITHUB_TOKEN }} --source ${{ env.GITHUB_SOURCE }} "FSharp.CosmosDB*.nupkg"
working-directory: ${{ env.OUTPUT_PATH }}