Skip to content

add github actions to dependabot #3

add github actions to dependabot

add github actions to dependabot #3

Workflow file for this run

name: build
on:
push:
branches:
- "**"
pull_request:
branches:
- "master"
jobs:
build_matrix:
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET 6.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
- name: Restore Google.Authenticator
run: dotnet restore ./Google.Authenticator/Google.Authenticator.csproj
- name: Restore Google.Authenticator.Tests
run: dotnet restore ./Google.Authenticator.Tests/Google.Authenticator.Tests.csproj
- name: Build Package
run: dotnet build ./Google.Authenticator/Google.Authenticator.csproj --configuration $(buildConfiguration) --no-restore
- name: Build Tests
run: dotnet build ./Google.Authenticator.Tests/Google.Authenticator.Tests.csproj --configuration $(buildConfiguration) --no-restore --no-dependencies
- name: Test
run: dotnet test ./Google.Authenticator.Tests/Google.Authenticator.Tests.csproj --no-build --verbosity normal --configuration Release
- name: Pack
if: ${{ github.ref == 'refs/heads/master' && github.event_name != 'pull_request' }}
run: |
dotnet pack ./Google.Authenticator/Google.Authenticator.csproj --configuration $(buildConfiguration) --no-build
dotnet nuget push **\*.nupkg --source 'https://api.nuget.org/v3/index.json' --skip-duplicate -k ${{ secrets.NUGET_API_KEY }}