Skip to content

Commit 966dc62

Browse files
committed
CI: Azure Pipelines -> GitHub Actions
1 parent c3a6657 commit 966dc62

File tree

2 files changed

+72
-68
lines changed

2 files changed

+72
-68
lines changed

.github/workflows/ci.yaml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: CI
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- master
8+
pull_request:
9+
types: [opened, synchronize, reopened]
10+
release:
11+
types:
12+
- created
13+
14+
jobs:
15+
package:
16+
# build, test, and deploy the core package on Linux
17+
name: Package
18+
runs-on: ubuntu-latest
19+
env:
20+
CSPROJ_CORE: src/Spectrogram/Spectrogram.csproj
21+
CSPROJ_TESTS: src/Spectrogram.Tests/Spectrogram.Tests.csproj
22+
steps:
23+
- name: 🛒 Checkout
24+
uses: actions/checkout@v2
25+
- name: ✨ Setup .NET 6
26+
uses: actions/setup-dotnet@v1
27+
with:
28+
dotnet-version: "6.0.x"
29+
include-prerelease: true
30+
- name: 🚚 Restore
31+
run: |
32+
dotnet restore ${{ env.CSPROJ_CORE }}
33+
dotnet restore ${{ env.CSPROJ_TESTS }}
34+
- name: 🛠️ Build
35+
run: |
36+
dotnet build ${{ env.CSPROJ_CORE }} --configuration Release
37+
dotnet build ${{ env.CSPROJ_TESTS }}
38+
- name: 🧪 Test
39+
run: dotnet test ${{ env.CSPROJ_TESTS }}
40+
- name: 📦 Pack
41+
run: dotnet pack ${{ env.CSPROJ_CORE }} --configuration Release
42+
- name: 💾 Store
43+
uses: actions/upload-artifact@v2
44+
with:
45+
name: Packages
46+
retention-days: 1
47+
path: src/Spectrogram/bin/Release/*.nupkg
48+
- name: 🛠️ Setup NuGet
49+
if: github.event_name == 'release'
50+
uses: nuget/setup-nuget@v1
51+
with:
52+
nuget-api-key: ${{ secrets.NUGET_API_KEY }}
53+
- name: 🚀 Publish
54+
if: github.event_name == 'release'
55+
run: nuget push "src/Spectrogram/bin/Release/*.nupkg" -SkipDuplicate -Source https://api.nuget.org/v3/index.json
56+
57+
solution:
58+
# build the whole solution (.NET Framework demos require Windows/MSBuild)
59+
name: Build Solution
60+
runs-on: windows-latest
61+
steps:
62+
- name: 🛒 Checkout
63+
uses: actions/checkout@v1
64+
- name: ✨ Setup NuGet
65+
uses: nuget/setup-nuget@v1
66+
- name: ✨ Setup MSBuild
67+
uses: microsoft/[email protected]
68+
- name: 🚚 Restore
69+
working-directory: src
70+
run: nuget restore
71+
- name: 🛠️ Build Release
72+
run: msbuild src -verbosity:minimal

dev/build/azure-pipelines.yml

Lines changed: 0 additions & 68 deletions
This file was deleted.

0 commit comments

Comments
 (0)