feat: add support for authorization (#49) #30
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
build-test-main: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '8.0.x' | |
- name: Install .NET Aspire workload | |
run: dotnet workload install aspire | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
- name: Install dependencies and build the client | |
working-directory: example/livedocs-client | |
run: | | |
npm ci | |
npm run build | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --configuration Release --no-restore | |
- name: Test with coverage | |
run: dotnet test ./tests/RxDBDotNet.Tests/RxDBDotNet.Tests.csproj --configuration Release --collect:"XPlat Code Coverage" --settings coverlet.runsettings | |
timeout-minutes: 5 | |
- name: Upload coverage to Codecov | |
uses: codecov/[email protected] | |
with: | |
files: ./tests/RxDBDotNet.Tests/TestResults/*/coverage.lcov | |
fail_ci_if_error: true | |
token: ${{ secrets.CODECOV_TOKEN }} | |
- name: Install GitVersion | |
uses: gittools/actions/gitversion/[email protected] | |
with: | |
versionSpec: '5.x' | |
- name: Determine Version | |
id: gitversion | |
uses: gittools/actions/gitversion/[email protected] | |
- name: Set the versions | |
run: | | |
echo "NUGET_VERSION=${{ steps.gitversion.outputs.SemVer }}-alpha" >> $env:GITHUB_ENV | |
echo "ASSEMBLY_VERSION=${{ steps.gitversion.outputs.AssemblySemVer }}" >> $env:GITHUB_ENV | |
echo "FILE_VERSION=${{ steps.gitversion.outputs.AssemblySemVer }}" >> $env:GITHUB_ENV | |
echo "INFORMATIONAL_VERSION=${{ steps.gitversion.outputs.InformationalVersion }}" >> $env:GITHUB_ENV | |
- name: Create or update the release draft | |
uses: release-drafter/release-drafter@v5 | |
with: | |
version: ${{ env.NUGET_VERSION }} | |
config-name: release-drafter.yml | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |