Skip to content
Merged
35 changes: 29 additions & 6 deletions .github/workflows/Hackney.Core.Authorization.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
- feature/**
paths:
- "Hackney.Core/Hackney.Core.Authorization/**"
- "Hackney.Core/Hackney.Core.JWT/**"
- "Hackney.Core.Tests/Hackney.Core.Tests.JWT/**"
- ".github/workflows/Hackney.Core.Authorization.yml"
jobs:
calculate-version:
Expand Down Expand Up @@ -51,7 +53,7 @@ jobs:
cd Hackney.Core
./dotnet-format-local/dotnet-format --check Hackney.Core.Authorization

build-and-test:
build:
name: Build
runs-on: ubuntu-latest
needs: calculate-version
Expand All @@ -62,15 +64,36 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build
- name: Build-Authorization-Project
run: docker-compose build hackney-core-authorization
- name: Build-JWT-Project
run: docker-compose build hackney-core-jwt-test

publish-package:
name: Publish Package
publish-jwt-package:
name: Publish JWT Package
runs-on: ubuntu-latest
needs: build-and-test
needs: build
env:
VERSION: ${{ needs.build-and-test.outputs.version }}
VERSION: ${{ needs.build.outputs.version }}
LBHPACKAGESTOKEN: ${{secrets.LBHPACKAGESTOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build the Package
run: |
cd Hackney.Core
dotnet pack Hackney.Core.JWT -p:PackageVersion=$VERSION --configuration Release
- name: Publish the Package
run: |
cd Hackney.Core/Hackney.Core.JWT/bin/Release
dotnet nuget push Hackney.Core.JWT.*.nupkg -s https://nuget.pkg.github.com/LBHackney-IT/index.json --api-key ${{secrets.NUGET_KEY }}

publish-authorization-package:
name: Publish Authorization Package
runs-on: ubuntu-latest
needs: build
env:
VERSION: ${{ needs.build.outputs.version }}
LBHPACKAGESTOKEN: ${{secrets.LBHPACKAGESTOKEN }}
steps:
- name: Checkout
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/Hackney.Core.JWT.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ jobs:
needs: build-and-test
env:
VERSION: ${{ needs.build-and-test.outputs.version }}
LBHPACKAGESTOKEN: ${{secrets.LBHPACKAGESTOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Hackney.Core.JWT\Hackney.Core.JWT.csproj" />
</ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions Hackney.Core/Hackney.Core.JWT/Token.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ public class Token

public string Name { get; set; }

public int Nbf { get; set; }
public long Nbf { get; set; }

public int Exp { get; set; }
public long Exp { get; set; }

public int Iat { get; set; }
public long Iat { get; set; }
}
}