mirror of
https://github.com/actions/setup-dotnet.git
synced 2025-08-18 06:35:09 +00:00
Added additional examples
Includes: - Full publish - Using external package sources
This commit is contained in:
parent
6c0e2a2a6b
commit
9e7edbaefa
38
README.md
38
README.md
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user