Skip to content

Commit

Permalink
ci: Ship as global tool to NuGet.org (#8280)
Browse files Browse the repository at this point in the history
* chore!: drop azure pipeline, build scripts and nuspec files

* chore!: .NET 6 only

* ci: Release using GH action
  • Loading branch information
yufeih authored Dec 17, 2022
1 parent 4dd4033 commit e918f83
Show file tree
Hide file tree
Showing 74 changed files with 95 additions and 2,051 deletions.
42 changes: 16 additions & 26 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,29 @@
name: CodeQL

name: codeql
on:
push:
branches: [ dev ]
pull_request:
branches: [ dev ]
schedule:
- cron: '28 6 * * 5'

- cron: '0 0 * * 0'
jobs:
analyze:
name: CodeQL
runs-on: windows-2019

codeql:
runs-on: windows-latest
permissions:
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'csharp', 'javascript' ]

steps:
- name: Checkout repository
uses: actions/checkout@v2
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 16
- uses: actions/setup-dotnet@v1
with:
fetch-depth: 0
dotnet-version: 6.x

- name: Initialize CodeQL
uses: github/codeql-action/init@v1
- uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
config-file: ./.github/codeql-config.yml
- run: pwsh .\tools\Deployment\deploy.ps1
languages: ['csharp', 'javascript']

- run: ./UpdateTemplate.ps1
- run: dotnet build -c Release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
- uses: github/codeql-action/analyze@v1
42 changes: 42 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: release
on:
release:
types: [published]

jobs:
build:
runs-on: windows-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 16
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.x

- run: ./UpdateTemplate.ps1
- run: dotnet pack -c Release -o drop /p:Version=${{ github.ref_name }}

- uses: actions/upload-artifact@v3
with:
name: docfx
path: drop

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
- uses: actions/download-artifact@v3
with:
name: docfx
path: drop
- run: |
for filename in ./drop/*.nupkg; do
dotnet nuget push "$filename" --api-key ${{ secrets.NUGET_KEY }} --source https://api.nuget.org/v3/index.json
done
4 changes: 1 addition & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test
name: test
on:
pull_request:
branches: [ dev, main, feature/* ]
Expand All @@ -7,11 +7,9 @@ on:

jobs:
test:
name: Test
runs-on: windows-latest
steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v3
with:
node-version: 16
Expand Down
11 changes: 0 additions & 11 deletions NuGet.config

This file was deleted.

244 changes: 0 additions & 244 deletions azure-pipelines-master.yml

This file was deleted.

Loading

0 comments on commit e918f83

Please sign in to comment.