Added additional examples

Includes:
- Full publish
- Using external package sources
This commit is contained in:
Alexander Horner 2019-09-14 13:27:55 +01:00 committed by GitHub
parent 6c0e2a2a6b
commit 9e7edbaefa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,7 +13,7 @@ This action sets up a dotnet environment for use in actions by:
See [action.yml](action.yml)
Basic:
##Basic:
```yaml
steps:
- uses: actions/checkout@master
@ -23,7 +23,7 @@ steps:
- run: dotnet build <my project>
```
Matrix Testing:
##Matrix Testing:
```yaml
jobs:
build:
@ -41,6 +41,40 @@ jobs:
- run: dotnet build <my project>
```
##Publishing a standalone copy for Release execution (include all dependencies):
```yaml
steps:
- uses: actions/checkout@v1
- uses: actions/setup-dotnet@v1
- name: Restore NuGet Packages
run: dotnet restore
- name: Build + Publish with dotnet
run: dotnet publish --configuration Release
```
##Publishing a standalone copy for Release execution (include all dependencies with specified NuGet sources):
```yaml
steps:
- uses: actions/checkout@v1
- uses: actions/setup-dotnet@v1
- name: Restore NuGet Packages from nuget.config
run: dotnet restore --configfile nuget.config
- name: Build + Publish with dotnet
run: dotnet publish --configuration Release
```
###Your nuget.config may look like so, just add your sources under the default source
```xml
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<!--To inherit the global NuGet package sources remove the <clear/> line below -->
<clear />
<add key="nuget" value="https://api.nuget.org/v3/index.json" />
<add key="MySourceName" value="http://MySourceName/api/v3/index.json" />
</packageSources>
</configuration>
```
# License
The scripts and documentation in this project are released under the [MIT License](LICENSE)