Skip to content

Commit

Permalink
Update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
frederikprijck committed Oct 25, 2023
1 parent 109d342 commit fd164a2
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 27 deletions.
28 changes: 1 addition & 27 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,34 +36,8 @@ jobs:
run: msbuild Auth0.OidcClient.All.sln -t:rebuild -verbosity:diag -property:Configuration=Release

- name: Tests
uses: frederikprijck/vstest@main
uses: frederikprijck/vstest-action@main
with:
testAssembly: '**\bin\**\*UnitTests.dll'
searchFolder: '.\'
runInParallel: false

- name: NuGet pack
run: |
nuget pack nuget/Auth0.OidcClient.Android.nuspec
nuget pack nuget/Auth0.OidcClient.AndroidX.nuspec
nuget pack nuget/Auth0.OidcClient.Core.nuspec
nuget pack nuget/Auth0.OidcClient.iOS.nuspec
nuget pack nuget/Auth0.OidcClient.UWP.nuspec
nuget pack nuget/Auth0.OidcClient.WinForms.nuspec
nuget pack nuget/Auth0.OidcClient.WPF.nuspec
- name: Install DocFX
run: dotnet tool install -g docfx

- name: Build docs
run: ./tools/build-docs.sh
shell: bash

- uses: actions/upload-artifact@v3
with:
name: docs
path: docs
- uses: actions/upload-artifact@v3
with:
name: drop
path: '**/*.nupkg'
88 changes: 88 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Publish Release

on:
workflow_dispatch:
inputs:
branch:
description: The branch to release from
required: true
default: master

permissions:
contents: read

env:
NODE_VERSION: 18

jobs:
publish-nuget:
needs: configure

name: Publish to NPM
runs-on: windows-latest
environment: 'release'

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.inputs.branch }}

- name: Install .NET
uses: frederikprijck/setup-dotnet@main
with:
dotnet-version: 6.x

- name: Install .NET iOS workload
run: dotnet workload install ios

- name: Install .NET Android workload
run: dotnet workload install android

- name: Setup NuGet
uses: frederikprijck/setup-nuget@main

- name: Restore NuGet
run: nuget restore Auth0.OidcClient.All.sln

- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1.1

- name: Build
run: msbuild Auth0.OidcClient.All.sln -t:rebuild -verbosity:diag -property:Configuration=Release

- name: NuGet pack
run: |
nuget pack nuget/Auth0.OidcClient.Android.nuspec
nuget pack nuget/Auth0.OidcClient.AndroidX.nuspec
nuget pack nuget/Auth0.OidcClient.Core.nuspec
nuget pack nuget/Auth0.OidcClient.iOS.nuspec
nuget pack nuget/Auth0.OidcClient.UWP.nuspec
nuget pack nuget/Auth0.OidcClient.WinForms.nuspec
nuget pack nuget/Auth0.OidcClient.WPF.nuspec
- name: Install DocFX
run: dotnet tool install -g docfx

- name: Build docs
run: ./tools/build-docs.sh
shell: bash

- uses: frederikprijck/upload-artifact@main
with:
name: docs
path: docs

- uses: frederikprijck/upload-artifact@main
with:
name: drop
path: '**/*.nupkg'

- name: Publish release to NuGet
run: nuget push **\*.nupkg -ApiKey ${{ env.NUGET_API_KEY }} -Source https://api.nuget.org/v3/index.json -SkipDuplicate -NonInteractive
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}



0 comments on commit fd164a2

Please sign in to comment.