Skip to content

Release

Release #2

Workflow file for this run

name: Release
on:
release:
types: [published]
# push:
# tags:
# - '*.*.*'
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest]
fail-fast: false
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup .NET 6.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
- name: Setup .NET 8.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: '8.0.x'
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
- name: Pack
run: dotnet pack --configuration Release --no-build --output ./package
- name: Push to github
run: dotnet nuget push ./package/*.nupkg --source https://nuget.pkg.github.com/cadabra/index.json --api-key ${{ secrets.RECURRENCE_API_KEY }}
- name: Push to NuGet
run: dotnet nuget push ./package/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} --skip-duplicate