Skip to content

Commit 81ca5f7

Browse files
committed
Merge remote-tracking branch 'origin/main' into doco
2 parents 257d9b2 + 61ee7d7 commit 81ca5f7

File tree

9 files changed

+442
-243
lines changed

9 files changed

+442
-243
lines changed

.github/workflows/workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
pull_request:
55
push:
66
branches:
7-
- master
7+
- main
88
- releases/*
99

1010
jobs:

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ See [action.yml](action.yml)
2323
Basic:
2424
```yaml
2525
steps:
26-
- uses: actions/checkout@master
26+
- uses: actions/checkout@main
2727
- uses: actions/setup-dotnet@v1
2828
with:
2929
dotnet-version: '3.1.x' # SDK Version to use; x will use the latest version of the 3.1 channel
@@ -40,7 +40,7 @@ jobs:
4040
dotnet: [ '2.2.103', '3.0', '3.1.x' ]
4141
name: Dotnet ${{ matrix.dotnet }} sample
4242
steps:
43-
- uses: actions/checkout@master
43+
- uses: actions/checkout@main
4444
- name: Setup dotnet
4545
uses: actions/setup-dotnet@v1
4646
with:
@@ -51,7 +51,7 @@ jobs:
5151
Authentication for nuget feeds:
5252
```yaml
5353
steps:
54-
- uses: actions/checkout@master
54+
- uses: actions/checkout@main
5555
# Authenticates packages to push to GPR
5656
- uses: actions/setup-dotnet@v1
5757
with:
@@ -90,7 +90,7 @@ build:
9090
env:
9191
DOTNET_NOLOGO: true
9292
steps:
93-
- uses: actions/checkout@master
93+
- uses: actions/checkout@main
9494
- uses: actions/setup-dotnet@v1
9595
with:
9696
dotnet-version: '3.1.100' # SDK Version to use.

action.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ author: 'GitHub'
44
branding:
55
icon: play
66
color: green
7-
inputs:
7+
inputs:
88
dotnet-version:
99
description: 'SDK version to use. Examples: 2.2.104, 3.1, 3.1.x'
1010
source-url:
@@ -13,10 +13,6 @@ inputs:
1313
description: 'Optional OWNER for using packages from GitHub Package Registry organizations/users other than the current repository''s owner. Only used if a GPR URL is also provided in source-url'
1414
config-file:
1515
description: 'Optional NuGet.config location, if your NuGet.config isn''t located in the root of the repo.'
16-
# Deprecated option, do not use. Will not be supported after October 1, 2019
17-
version:
18-
description: 'Deprecated. Use dotnet-version instead. Will not be supported after October 1, 2019'
19-
deprecationMessage: 'The version property will not be supported after October 1, 2019. Use dotnet-version instead'
2016
runs:
2117
using: 'node12'
2218
main: 'dist/index.js'

dist/index.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7872,13 +7872,13 @@ function run() {
78727872
return __awaiter(this, void 0, void 0, function* () {
78737873
try {
78747874
//
7875-
// Version is optional. If supplied, install / use from the tool cache
7876-
// If not supplied then task is still used to setup proxy, auth, etc...
7875+
// dotnet-version is optional, but needs to be provided for most use cases.
7876+
// If supplied, install / use from the tool cache.
7877+
// If not supplied, look for version in ./global.json.
7878+
// If a valid version still can't be identified, nothing will be installed.
7879+
// Proxy, auth, (etc) are still set up, even if no version is identified
78777880
//
7878-
let version = core.getInput('version');
7879-
if (!version) {
7880-
version = core.getInput('dotnet-version');
7881-
}
7881+
let version = core.getInput('dotnet-version');
78827882
if (!version) {
78837883
// Try to fall back to global.json
78847884
core.debug('No version found, trying to find version from global.json');

docs/contributors.md

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,24 @@
11
# Contributors
22

3+
Thank you for contributing! This action is targetted around setting up the dotnet cli and related sdks for GitHub actions. As part of that we use proxy settings (for self-hosted runners) and set-up nuget authentication for private feeds.
34

4-
# Checkin
5+
If you would like to contribute there are a few things to consider:
56

6-
- Do checkin source (src)
7-
- Do checkin build output (lib)
8-
- Do checkin runtime node_modules
9-
- Do not checkin
7+
## Commands to use
108

11-
# Adding a dev dependency
9+
- npm run build - Compiles the action into a single js file at dist/index.js (Please check in the changes made by this command)
10+
- npm run test - Runs all tests under __tests__
11+
- npm run format - Runs formatting required to pass the lint test (Please check in the changes made by this command)
12+
- npm run update-installers - Updates the install-dotnet scripts in externals (Please check in the changes made by this command)
1213

13-
Remember to update .gitignore.
14+
## To check in or not to check in
1415

15-
# Updating toolkit dependency
16+
- Do check in source (src)
17+
- Do check in index file (dist)
18+
- Do check in updates to install-dotnet scripts (externals)
19+
- Do not check in build output (lib)
20+
- Do not check in runtime (node_modules)
1621

17-
Until released publically, update tgz packages in toolkit
22+
## Writing tests
23+
24+
With any contribution please take time to consider how this can be tested to maintain high quality. Current tests can be found in the folder __tests__ for examples.

0 commit comments

Comments
 (0)