refactor: IBlockCrypto #724
This file contains hidden or 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: | |
| tags: | |
| - '*' | |
| branches: | |
| - master | |
| - renovate/** | |
| pull_request: | |
| env: | |
| ProjectName: ${{ github.event.repository.name }} | |
| DOTNET_CLI_TELEMETRY_OPTOUT: 1 | |
| DOTNET_NOLOGO: 1 | |
| DOTNET_GENERATE_ASPNET_CERTIFICATE: false | |
| NET_VERSION: 10.0.x | |
| jobs: | |
| check_format: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: ${{ env.NET_VERSION }} | |
| - name: Check .NET format | |
| run: dotnet format -v diag --verify-no-changes | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: | |
| - windows-latest | |
| - ubuntu-latest | |
| - macos-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: ${{ env.NET_VERSION }} | |
| - name: Test build | |
| run: dotnet build -c Release | |
| - name: Run tests | |
| working-directory: test/${{ env.ProjectName }}.Tests | |
| run: dotnet test -c Release | |
| - name: Run tests (Disable AVX) | |
| if: matrix.os != 'macos-latest' | |
| working-directory: test/${{ env.ProjectName }}.Tests | |
| run: dotnet test -c Release | |
| env: | |
| DOTNET_EnableAVX: 0 | |
| build: | |
| needs: [check_format, test] | |
| if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }} | |
| runs-on: ubuntu-latest | |
| permissions: | |
| packages: write | |
| strategy: | |
| matrix: | |
| NugetProjectName: | |
| - CryptoBase | |
| - CryptoBase.Abstractions | |
| - CryptoBase.BouncyCastle | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: ${{ env.NET_VERSION }} | |
| - name: Build | |
| working-directory: src/${{ matrix.NugetProjectName }} | |
| run: dotnet pack | |
| - name: Push nuget packages | |
| working-directory: src/${{ matrix.NugetProjectName }}/bin/Release | |
| run: | | |
| dotnet nuget push *.nupkg -s https://nuget.pkg.github.com/HMBSbige -k ${{ secrets.GITHUB_TOKEN }} --skip-duplicate | |
| dotnet nuget push *.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NuGetAPIKey }} --skip-duplicate | |
| dotnet nuget push *.snupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NuGetAPIKey }} --skip-duplicate | |
| release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Create Release | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| draft: false | |
| prerelease: false |