Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into global-json
Browse files Browse the repository at this point in the history
  • Loading branch information
Zachary Eisinger committed May 15, 2020
2 parents 553ff3f + 00f2601 commit a0982bf
Show file tree
Hide file tree
Showing 206 changed files with 28,121 additions and 15,324 deletions.
9 changes: 5 additions & 4 deletions .github/csc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
"owner": "csc",
"pattern": [
{
"regexp": "^([^\\s].*)\\((\\d+|\\d+,\\d+|\\d+,\\d+,\\d+,\\d+)\\):\\s+(error|warning|info)\\s+(CS\\d+)\\s*:\\s*(.*)$",
"regexp": "^([^\\s].*)\\((\\d+)(?:,\\d+|,\\d+,\\d+)?\\):\\s+(error|warning)\\s+([a-zA-Z]+(?<!MSB)\\d+):\\s*(.*?)\\s+\\[(.*?)\\]$",
"file": 1,
"location": 2,
"line": 2,
"severity": 3,
"code": 4,
"message": 5
"message": 5,
"fromPath": 6
}
]
}
]
}
}
95 changes: 80 additions & 15 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,91 @@
name: Main workflow
on: [push]

on:
pull_request:
push:
branches:
- master
- releases/*

jobs:
run:
name: Run
build:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest, windows-latest]
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- name: Checkout
uses: actions/checkout@master

- name: Set Node.js 10.x
uses: actions/setup-node@master
uses: actions/checkout@v2
- name: Set Node.js 12
uses: actions/setup-node@v1
with:
version: 10.x
version: 12.x
- run: npm ci
- run: npm run build
- run: npm run format-check
- run: npm test
- name: Verify no unstaged changes
if: runner.os != 'windows'
run: __tests__/verify-no-unstaged-changes.sh

- name: npm install
run: npm install
test:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Clear tool cache
run: mv "${{ runner.tool_cache }}" "${{ runner.tool_cache }}.old"
- name: Setup dotnet 3.0.100
uses: ./
with:
dotnet-version: 3.0.100
- name: Verify dotnet
if: runner.os != 'windows'
run: __tests__/verify-dotnet.sh 3.0.100
- name: Verify dotnet (Windows)
if: runner.os == 'windows'
run: __tests__/verify-dotnet.ps1 3.0.100

- name: Lint
run: npm run format-check
test-proxy:
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/dotnet/core/runtime-deps:3.0-bionic
options: --dns 127.0.0.1
services:
squid-proxy:
image: datadog/squid:latest
ports:
- 3128:3128
env:
https_proxy: http://squid-proxy:3128
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Clear tool cache
run: rm -rf $RUNNER_TOOL_CACHE/*
- name: Setup dotnet 3.0.100
uses: ./
with:
dotnet-version: 3.0.100
- name: Verify dotnet
run: __tests__/verify-dotnet.sh 3.0.100

- name: npm test
run: npm test
test-bypass-proxy:
runs-on: ubuntu-latest
env:
https_proxy: http://no-such-proxy:3128
no_proxy: github.com,dotnetcli.blob.core.windows.net,download.visualstudio.microsoft.com,api.nuget.org
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Clear tool cache
run: mv "${{ runner.tool_cache }}" "${{ runner.tool_cache }}.old"
- name: Setup dotnet 3.0.100
uses: ./
with:
dotnet-version: 3.0.100
- name: Verify dotnet
run: __tests__/verify-dotnet.sh 3.0.100
102 changes: 96 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,98 @@
# runtime dependencies are checked in
# dev dependencies are *not* checked in
node_modules/.bin
node_modules/typescript
node_modules/@types
node_modules/prettier
global.json
lib/
node_modules/
__tests__/runner/*
global.json
__tests__/sample-csproj/bin/
__tests__/sample-csproj/obj/

# Rest of the file pulled from https://github.com/github/gitignore/blob/master/Node.gitignore
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# next.js build output
.next

# nuxt.js build output
.nuxt

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

.vscode/*
34 changes: 31 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
<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>
</p>

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

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

# Usage

Expand All @@ -19,7 +20,7 @@ steps:
- uses: actions/checkout@master
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '2.2.103' // SDK Version to use.
dotnet-version: '3.1.100' # SDK Version to use.
- run: dotnet build <my project>
```
Expand All @@ -30,7 +31,7 @@ jobs:
runs-on: ubuntu-16.04
strategy:
matrix:
dotnet: [ '2.2.103', '3.5.2', '4.5.1' ]
dotnet: [ '2.2.103', '3.0.100', '3.1.100' ]
name: Dotnet ${{ matrix.dotnet }} sample
steps:
- uses: actions/checkout@master
Expand All @@ -41,6 +42,33 @@ jobs:
- run: dotnet build <my project>
```
Authentication for nuget feeds:
```yaml
steps:
- uses: actions/checkout@master
# Authenticates packages to push to GPR
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.100' # SDK Version to use.
source-url: https://nuget.pkg.github.com/<owner>/index.json
env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- run: dotnet build <my project>
- name: Create the package
run: dotnet pack --configuration Release <my project>
- name: Publish the package to GPR
run: dotnet nuget push <my project>/bin/Release/*.nupkg

# Authticates packages to push to Azure Artifacts
- uses: actions/setup-dotnet@v1
with:
source-url: https://pkgs.dev.azure.com/<your-organization>/_packaging/<your-feed-name>/nuget/v3/index.json
env:
NUGET_AUTH_TOKEN: ${{secrets.AZURE_DEVOPS_PAT}} # Note, create a secret with this name in Settings
- name: Publish the package to Azure Artifacts
run: dotnet nuget push <my project>/bin/Release/*.nupkg
```
# License
The scripts and documentation in this project are released under the [MIT License](LICENSE)
Expand Down
Loading

0 comments on commit a0982bf

Please sign in to comment.