Skip to content

Commit

Permalink
adding workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Mahmoud Swehli committed Sep 13, 2023
1 parent 35698a5 commit 345d127
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 2 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/magiclink.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net

name: Publish MagicLink library to nuget

on:
push:
paths:
- src/Muljin.B2CMagicLink/Muljin.B2CMagicLink/*.csproj
- .github/workflows/magiclink.yml
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:
runs-on: ubuntu-latest
environment: Production
steps:
- uses: actions/checkout@v2

- name: Set up .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '7.x'
include-prerelease: true

- name: Pack with dotnet
run: dotnet pack --configuration Release -o ./out
working-directory: ./src/Muljin.B2CMagicLink/Muljin.B2CMagicLink
- name: Push to nuget
run: dotnet nuget push *.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }}
working-directory: ./src/Muljin.B2CMagicLink/Muljin.B2CMagicLink/out
33 changes: 33 additions & 0 deletions .github/workflows/magiclinkkeeyvault.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net

name: Publish MagicLink Azure KeyVault library to nuget

on:
push:
paths:
- src/Muljin.B2CMagicLink/Muljin.B2CMagicLink.AzureKeyVault/*.csproj
- .github/workflows/magiclink.yml
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:
runs-on: ubuntu-latest
environment: Production
steps:
- uses: actions/checkout@v2

- name: Set up .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '7.x'
include-prerelease: true

- name: Pack with dotnet
run: dotnet pack --configuration Release -o ./out
working-directory: ./src/Muljin.B2CMagicLink/Muljin.B2CMagicLink.AzureKeyVault
- name: Push to nuget
run: dotnet nuget push *.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }}
working-directory: ./src/Muljin.B2CMagicLink/Muljin.B2CMagicLink.AzureKeyVault/out
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@
<PackageReference Include="Microsoft.Extensions.Azure" Version="1.6.3" />
<PackageReference Include="Azure.Security.KeyVault.Keys" Version="4.5.0" />
<PackageReference Include="Azure.Security.KeyVault.Certificates" Version="4.5.1" />
<PackageReference Include="Muljin.B2CMagicLink.Abstractions" Version="0.0.1" />
<PackageReference Include="Muljin.B2CMagicLink.Abstractions" Version="0.0.2" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Azure" Version="1.6.3" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.2.5" />
<PackageReference Include="Muljin.B2CMagicLink.Abstractions" Version="0.0.1" />
<PackageReference Include="Muljin.B2CMagicLink.Abstractions" Version="0.0.2" />
</ItemGroup>
<ItemGroup>
<None Remove="Controllers\" />
Expand Down

0 comments on commit 345d127

Please sign in to comment.