-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (31 loc) · 1.15 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
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Package
run: dotnet pack --configuration Release --output "out_nuget" --no-build
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: nuget package
path: ${{ github.workspace }}/**/*.nupkg
- name: Publish
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: |
dotnet nuget add source "https://nuget.pkg.github.com/mendix/index.json" --name "GitHub" --username ${{ secrets.GHPACKAGESUSER }} --password ${{ secrets.GHPACKAGESTOKEN }} --store-password-in-clear-text
dotnet nuget push "**/out_nuget/Mendix.Web.Services.Discovery.*.nupkg" --api-key ${{ secrets.GHPACKAGESTOKEN }} --source "GitHub" --skip-duplicate