Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub Actions #242

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@
version: 2
updates:
- package-ecosystem: "nuget"
directory: "/Google.Authenticator"
directory: "/Google.Authenticator.Tests"
directories:
- "/Google.Authenticator"
- "/Google.Authenticator.Tests"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
41 changes: 41 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
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: Setup .NET 7.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.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 Release --no-restore
- name: Build Tests
run: dotnet build ./Google.Authenticator.Tests/Google.Authenticator.Tests.csproj --configuration Release --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: ${{ runner.os == 'Windows' && 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_KEY }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# GoogleAuthenticator
Simple, easy to use server-side two-factor authentication library for .NET that works with Google Authenticator

[![Build Status](https://dev.azure.com/brandon-potter/GoogleAuthenticator/_apis/build/status/BrandonPotter.GoogleAuthenticator?branchName=master)](https://dev.azure.com/brandon-potter/GoogleAuthenticator/_build/latest?definitionId=1&branchName=master)
[![build](https://github.com/BrandonPotter/GoogleAuthenticator/actions/workflows/build.yml/badge.svg)](https://github.com/BrandonPotter/GoogleAuthenticator/actions/workflows/build.yml)
[![NuGet Status](https://img.shields.io/nuget/v/GoogleAuthenticator.svg)](https://www.nuget.org/packages/GoogleAuthenticator/)

[`Install-Package GoogleAuthenticator`](https://www.nuget.org/packages/GoogleAuthenticator)
Expand Down
64 changes: 0 additions & 64 deletions build/azure-pipeline.yaml

This file was deleted.

Loading