Skip to content

Commit

Permalink
CI: update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
swharden committed Mar 24, 2022
1 parent e2d7058 commit a3f6671
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 51 deletions.
55 changes: 44 additions & 11 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,30 +1,63 @@
name: CI
name: CI/CD

on:
workflow_dispatch:
push:
branches:
- master
- main
pull_request:
types: [opened, synchronize, reopened]
release:
types:
- created

jobs:
test:
name: Test
build:
name: Build, Test, and Deploy
runs-on: windows-latest
defaults:
run:
working-directory: ./src
steps:
- name: 🛒 Checkout
uses: actions/checkout@v2
- name: ✨ Setup .NET 5 # CI: do not increase this

- name: ✨ Setup .NET 5
uses: actions/setup-dotnet@v1
with:
dotnet-version: "5.0.x"

- name: ✨ Setup .NET 6
uses: actions/setup-dotnet@v1
with:
dotnet-version: "6.0.x"
include-prerelease: true

- name: 🚚 Restore
run: dotnet restore
run: dotnet restore src

- name: 🛠️ Build
run: dotnet build
run: dotnet build src --configuration Release --no-restore

- name: 🧪 Test
run: dotnet test
run: dotnet test src --configuration Release --no-build

- name: 📦 Pack
run: dotnet pack src --configuration Release --no-build

- name: 💾 Store Release Package
if: github.event_name == 'release'
uses: actions/upload-artifact@v2
with:
name: Packages
retention-days: 1
path: |
src/FftSharp/bin/Release/*.nupkg
src/FftSharp/bin/Release/*.snupkg
- name: 🔑 Configure NuGet Secrets
if: github.event_name == 'release'
uses: nuget/setup-nuget@v1
with:
nuget-api-key: ${{ secrets.NUGET_API_KEY }}

- name: 🚀 Deploy Release Package
if: github.event_name == 'release'
run: nuget push "src\FftSharp\bin\Release\*.nupkg" -SkipDuplicate -Source https://api.nuget.org/v3/index.json
40 changes: 0 additions & 40 deletions .github/workflows/publish.yaml

This file was deleted.

0 comments on commit a3f6671

Please sign in to comment.