Skip to content

Commit 8d0d24d

Browse files
authored
Created CI/CD pipeline
1 parent 3cc73a9 commit 8d0d24d

1 file changed

Lines changed: 46 additions & 0 deletions

File tree

.github/workflows/main.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Build & Publish
2+
3+
on:
4+
# push:
5+
# branches: [ master ]
6+
# pull_request:
7+
# branches: [ master ]
8+
workflow_dispatch:
9+
inputs:
10+
tags:
11+
description: 'Tags for this build'
12+
13+
jobs:
14+
publish:
15+
name: Build, Test, Pack & Release
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Build Fody project
20+
run: dotnet build -c Release
21+
- name: Run tests
22+
run: dotnet test -v=normal
23+
- name: Publish NuGet
24+
id: publishNuGet
25+
uses: brandedoutcast/publish-nuget@v2.5.5
26+
with:
27+
# Filepath of the project to be packaged, relative to root of repository
28+
PROJECT_FILE_PATH: src/SpatialFocus.MethodCache/SpatialFocus.MethodCache.csproj
29+
# NuGet package id, used for version detection & defaults to project name
30+
PACKAGE_NAME: SpatialFocus.MethodCache.Fody
31+
# API key to authenticate with NuGet server
32+
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
33+
# Flag to toggle pushing symbols along with nuget package to the server, disabled by default
34+
INCLUDE_SYMBOLS: true
35+
- name: Persist NuGet artifact
36+
uses: actions/upload-artifact@v1
37+
if: ${{steps.publishNuGet.outputs.PACKAGE_NAME != ''}}
38+
with:
39+
name: ${{steps.publishNuGet.outputs.PACKAGE_NAME}}
40+
path: ${{steps.publishNuGet.outputs.PACKAGE_PATH}}
41+
- name: Persist SNuGet artifact
42+
uses: actions/upload-artifact@v1
43+
if: ${{steps.publishNuGet.outputs.SYMBOLS_PACKAGE_NAME != ''}}
44+
with:
45+
name: ${{steps.publishNuGet.outputs.SYMBOLS_PACKAGE_NAME}}
46+
path: ${{steps.publishNuGet.outputs.SYMBOLS_PACKAGE_PATH}}

0 commit comments

Comments
 (0)