Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into doco
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Dwyer committed Jul 17, 2020
2 parents 257d9b2 + 61ee7d7 commit 81ca5f7
Show file tree
Hide file tree
Showing 9 changed files with 442 additions and 243 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:
push:
branches:
- master
- main
- releases/*

jobs:
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ See [action.yml](action.yml)
Basic:
```yaml
steps:
- uses: actions/checkout@master
- uses: actions/checkout@main
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x' # SDK Version to use; x will use the latest version of the 3.1 channel
Expand All @@ -40,7 +40,7 @@ jobs:
dotnet: [ '2.2.103', '3.0', '3.1.x' ]
name: Dotnet ${{ matrix.dotnet }} sample
steps:
- uses: actions/checkout@master
- uses: actions/checkout@main
- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
Expand All @@ -51,7 +51,7 @@ jobs:
Authentication for nuget feeds:
```yaml
steps:
- uses: actions/checkout@master
- uses: actions/checkout@main
# Authenticates packages to push to GPR
- uses: actions/setup-dotnet@v1
with:
Expand Down Expand Up @@ -90,7 +90,7 @@ build:
env:
DOTNET_NOLOGO: true
steps:
- uses: actions/checkout@master
- uses: actions/checkout@main
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.100' # SDK Version to use.
Expand Down
6 changes: 1 addition & 5 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ author: 'GitHub'
branding:
icon: play
color: green
inputs:
inputs:
dotnet-version:
description: 'SDK version to use. Examples: 2.2.104, 3.1, 3.1.x'
source-url:
Expand All @@ -13,10 +13,6 @@ inputs:
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'
config-file:
description: 'Optional NuGet.config location, if your NuGet.config isn''t located in the root of the repo.'
# Deprecated option, do not use. Will not be supported after October 1, 2019
version:
description: 'Deprecated. Use dotnet-version instead. Will not be supported after October 1, 2019'
deprecationMessage: 'The version property will not be supported after October 1, 2019. Use dotnet-version instead'
runs:
using: 'node12'
main: 'dist/index.js'
12 changes: 6 additions & 6 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7872,13 +7872,13 @@ function run() {
return __awaiter(this, void 0, void 0, function* () {
try {
//
// Version is optional. If supplied, install / use from the tool cache
// If not supplied then task is still used to setup proxy, auth, etc...
// dotnet-version is optional, but needs to be provided for most use cases.
// If supplied, install / use from the tool cache.
// If not supplied, look for version in ./global.json.
// If a valid version still can't be identified, nothing will be installed.
// Proxy, auth, (etc) are still set up, even if no version is identified
//
let version = core.getInput('version');
if (!version) {
version = core.getInput('dotnet-version');
}
let version = core.getInput('dotnet-version');
if (!version) {
// Try to fall back to global.json
core.debug('No version found, trying to find version from global.json');
Expand Down
25 changes: 16 additions & 9 deletions docs/contributors.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
# Contributors

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.

# Checkin
If you would like to contribute there are a few things to consider:

- Do checkin source (src)
- Do checkin build output (lib)
- Do checkin runtime node_modules
- Do not checkin
## Commands to use

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

Remember to update .gitignore.
## To check in or not to check in

# Updating toolkit dependency
- Do check in source (src)
- Do check in index file (dist)
- Do check in updates to install-dotnet scripts (externals)
- Do not check in build output (lib)
- Do not check in runtime (node_modules)

Until released publically, update tgz packages in toolkit
## Writing tests

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.
Loading

0 comments on commit 81ca5f7

Please sign in to comment.