Skip to content

Commit a0982bf

Browse files
author
Zachary Eisinger
committed
Merge remote-tracking branch 'origin/master' into global-json
2 parents 553ff3f + 00f2601 commit a0982bf

File tree

206 files changed

+28121
-15324
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

206 files changed

+28121
-15324
lines changed

.github/csc.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@
44
"owner": "csc",
55
"pattern": [
66
{
7-
"regexp": "^([^\\s].*)\\((\\d+|\\d+,\\d+|\\d+,\\d+,\\d+,\\d+)\\):\\s+(error|warning|info)\\s+(CS\\d+)\\s*:\\s*(.*)$",
7+
"regexp": "^([^\\s].*)\\((\\d+)(?:,\\d+|,\\d+,\\d+)?\\):\\s+(error|warning)\\s+([a-zA-Z]+(?<!MSB)\\d+):\\s*(.*?)\\s+\\[(.*?)\\]$",
88
"file": 1,
9-
"location": 2,
9+
"line": 2,
1010
"severity": 3,
1111
"code": 4,
12-
"message": 5
12+
"message": 5,
13+
"fromPath": 6
1314
}
1415
]
1516
}
1617
]
17-
}
18+
}

.github/workflows/workflow.yml

Lines changed: 80 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,91 @@
11
name: Main workflow
2-
on: [push]
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
- releases/*
9+
310
jobs:
4-
run:
5-
name: Run
11+
build:
612
runs-on: ${{ matrix.operating-system }}
713
strategy:
814
matrix:
9-
operating-system: [ubuntu-latest, windows-latest]
15+
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
1016
steps:
1117
- name: Checkout
12-
uses: actions/checkout@master
13-
14-
- name: Set Node.js 10.x
15-
uses: actions/setup-node@master
18+
uses: actions/checkout@v2
19+
- name: Set Node.js 12
20+
uses: actions/setup-node@v1
1621
with:
17-
version: 10.x
22+
version: 12.x
23+
- run: npm ci
24+
- run: npm run build
25+
- run: npm run format-check
26+
- run: npm test
27+
- name: Verify no unstaged changes
28+
if: runner.os != 'windows'
29+
run: __tests__/verify-no-unstaged-changes.sh
1830

19-
- name: npm install
20-
run: npm install
31+
test:
32+
runs-on: ${{ matrix.operating-system }}
33+
strategy:
34+
matrix:
35+
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
36+
steps:
37+
- name: Checkout
38+
uses: actions/checkout@v2
39+
- name: Clear tool cache
40+
run: mv "${{ runner.tool_cache }}" "${{ runner.tool_cache }}.old"
41+
- name: Setup dotnet 3.0.100
42+
uses: ./
43+
with:
44+
dotnet-version: 3.0.100
45+
- name: Verify dotnet
46+
if: runner.os != 'windows'
47+
run: __tests__/verify-dotnet.sh 3.0.100
48+
- name: Verify dotnet (Windows)
49+
if: runner.os == 'windows'
50+
run: __tests__/verify-dotnet.ps1 3.0.100
2151

22-
- name: Lint
23-
run: npm run format-check
52+
test-proxy:
53+
runs-on: ubuntu-latest
54+
container:
55+
image: mcr.microsoft.com/dotnet/core/runtime-deps:3.0-bionic
56+
options: --dns 127.0.0.1
57+
services:
58+
squid-proxy:
59+
image: datadog/squid:latest
60+
ports:
61+
- 3128:3128
62+
env:
63+
https_proxy: http://squid-proxy:3128
64+
steps:
65+
- name: Checkout
66+
uses: actions/checkout@v2
67+
- name: Clear tool cache
68+
run: rm -rf $RUNNER_TOOL_CACHE/*
69+
- name: Setup dotnet 3.0.100
70+
uses: ./
71+
with:
72+
dotnet-version: 3.0.100
73+
- name: Verify dotnet
74+
run: __tests__/verify-dotnet.sh 3.0.100
2475

25-
- name: npm test
26-
run: npm test
76+
test-bypass-proxy:
77+
runs-on: ubuntu-latest
78+
env:
79+
https_proxy: http://no-such-proxy:3128
80+
no_proxy: github.com,dotnetcli.blob.core.windows.net,download.visualstudio.microsoft.com,api.nuget.org
81+
steps:
82+
- name: Checkout
83+
uses: actions/checkout@v2
84+
- name: Clear tool cache
85+
run: mv "${{ runner.tool_cache }}" "${{ runner.tool_cache }}.old"
86+
- name: Setup dotnet 3.0.100
87+
uses: ./
88+
with:
89+
dotnet-version: 3.0.100
90+
- name: Verify dotnet
91+
run: __tests__/verify-dotnet.sh 3.0.100

.gitignore

Lines changed: 96 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,98 @@
1-
# runtime dependencies are checked in
21
# dev dependencies are *not* checked in
3-
node_modules/.bin
4-
node_modules/typescript
5-
node_modules/@types
6-
node_modules/prettier
2+
global.json
3+
lib/
4+
node_modules/
75
__tests__/runner/*
8-
global.json
6+
__tests__/sample-csproj/bin/
7+
__tests__/sample-csproj/obj/
8+
9+
# Rest of the file pulled from https://github.com/github/gitignore/blob/master/Node.gitignore
10+
# Logs
11+
logs
12+
*.log
13+
npm-debug.log*
14+
yarn-debug.log*
15+
yarn-error.log*
16+
lerna-debug.log*
17+
18+
# Diagnostic reports (https://nodejs.org/api/report.html)
19+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
20+
21+
# Runtime data
22+
pids
23+
*.pid
24+
*.seed
25+
*.pid.lock
26+
27+
# Directory for instrumented libs generated by jscoverage/JSCover
28+
lib-cov
29+
30+
# Coverage directory used by tools like istanbul
31+
coverage
32+
*.lcov
33+
34+
# nyc test coverage
35+
.nyc_output
36+
37+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
38+
.grunt
39+
40+
# Bower dependency directory (https://bower.io/)
41+
bower_components
42+
43+
# node-waf configuration
44+
.lock-wscript
45+
46+
# Compiled binary addons (https://nodejs.org/api/addons.html)
47+
build/Release
48+
49+
# Dependency directories
50+
jspm_packages/
51+
52+
# TypeScript v1 declaration files
53+
typings/
54+
55+
# TypeScript cache
56+
*.tsbuildinfo
57+
58+
# Optional npm cache directory
59+
.npm
60+
61+
# Optional eslint cache
62+
.eslintcache
63+
64+
# Optional REPL history
65+
.node_repl_history
66+
67+
# Output of 'npm pack'
68+
*.tgz
69+
70+
# Yarn Integrity file
71+
.yarn-integrity
72+
73+
# dotenv environment variables file
74+
.env
75+
.env.test
76+
77+
# parcel-bundler cache (https://parceljs.org/)
78+
.cache
79+
80+
# next.js build output
81+
.next
82+
83+
# nuxt.js build output
84+
.nuxt
85+
86+
# vuepress build output
87+
.vuepress/dist
88+
89+
# Serverless directories
90+
.serverless/
91+
92+
# FuseBox cache
93+
.fusebox/
94+
95+
# DynamoDB Local files
96+
.dynamodb/
97+
98+
.vscode/*

README.md

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44
<a href="https://github.com/actions/setup-dotnet"><img alt="GitHub Actions status" src="https://github.com/actions/setup-dotnet/workflows/Main%20workflow/badge.svg"></a>
55
</p>
66

7-
This action sets up a dotnet environment for use in actions by:
7+
This action sets up a [dotnet core cli](https://github.com/dotnet/cli) environment for use in actions by:
88

99
- optionally downloading and caching a version of dotnet by SDK version and adding to PATH
1010
- registering problem matchers for error output
11+
- setting up authentication to private package sources like GitHub Packages
1112

1213
# Usage
1314

@@ -19,7 +20,7 @@ steps:
1920
- uses: actions/checkout@master
2021
- uses: actions/setup-dotnet@v1
2122
with:
22-
dotnet-version: '2.2.103' // SDK Version to use.
23+
dotnet-version: '3.1.100' # SDK Version to use.
2324
- run: dotnet build <my project>
2425
```
2526
@@ -30,7 +31,7 @@ jobs:
3031
runs-on: ubuntu-16.04
3132
strategy:
3233
matrix:
33-
dotnet: [ '2.2.103', '3.5.2', '4.5.1' ]
34+
dotnet: [ '2.2.103', '3.0.100', '3.1.100' ]
3435
name: Dotnet ${{ matrix.dotnet }} sample
3536
steps:
3637
- uses: actions/checkout@master
@@ -41,6 +42,33 @@ jobs:
4142
- run: dotnet build <my project>
4243
```
4344
45+
Authentication for nuget feeds:
46+
```yaml
47+
steps:
48+
- uses: actions/checkout@master
49+
# Authenticates packages to push to GPR
50+
- uses: actions/setup-dotnet@v1
51+
with:
52+
dotnet-version: '3.1.100' # SDK Version to use.
53+
source-url: https://nuget.pkg.github.com/<owner>/index.json
54+
env:
55+
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
56+
- run: dotnet build <my project>
57+
- name: Create the package
58+
run: dotnet pack --configuration Release <my project>
59+
- name: Publish the package to GPR
60+
run: dotnet nuget push <my project>/bin/Release/*.nupkg
61+
62+
# Authticates packages to push to Azure Artifacts
63+
- uses: actions/setup-dotnet@v1
64+
with:
65+
source-url: https://pkgs.dev.azure.com/<your-organization>/_packaging/<your-feed-name>/nuget/v3/index.json
66+
env:
67+
NUGET_AUTH_TOKEN: ${{secrets.AZURE_DEVOPS_PAT}} # Note, create a secret with this name in Settings
68+
- name: Publish the package to Azure Artifacts
69+
run: dotnet nuget push <my project>/bin/Release/*.nupkg
70+
```
71+
4472
# License
4573
4674
The scripts and documentation in this project are released under the [MIT License](LICENSE)

0 commit comments

Comments
 (0)