chore: update libzt submodule forks #25
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: | |
| branches: [ main, master ] | |
| pull_request: | |
| branches: [ main, master ] | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| env: | |
| DOTNET_CLI_TELEMETRY_OPTOUT: 1 | |
| DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 10.0.x | |
| - name: Restore | |
| run: dotnet restore | |
| - name: Build | |
| run: dotnet build -c Release --no-restore | |
| - name: Format (verify) | |
| run: dotnet format --verify-no-changes | |
| - name: Test | |
| run: dotnet test -c Release --no-build | |
| pack: | |
| needs: test | |
| outputs: | |
| version: ${{ steps.set-version.outputs.version }} | |
| runs-on: ubuntu-latest | |
| env: | |
| DOTNET_CLI_TELEMETRY_OPTOUT: 1 | |
| DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 10.0.x | |
| - name: Compute Version | |
| id: set-version | |
| run: | | |
| VERSION="0.0.${{ github.run_number }}" | |
| echo "VERSION=$VERSION" >> $GITHUB_ENV | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| - name: Restore | |
| run: dotnet restore | |
| - name: Build | |
| run: dotnet build -c Release --no-restore | |
| - name: Pack | |
| run: dotnet pack ZTSharp/ZTSharp.csproj -c Release --no-build -o nuget-packages -p:ContinuousIntegrationBuild=true -p:Version="${{ env.VERSION }}" | |
| - name: Upload NuGet Package Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: nuget-package | |
| if-no-files-found: error | |
| path: nuget-packages/*.nupkg | |
| NugetUpload: | |
| needs: pack | |
| if: github.event_name == 'push' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download NuGet Package | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: nuget-package | |
| path: nuget-packages | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 10.0.x | |
| - name: Get Secrets | |
| uses: bitwarden/sm-action@v2 | |
| with: | |
| access_token: ${{ secrets.BW_ACCESS_TOKEN }} | |
| base_url: https://vault.bitwarden.eu | |
| secrets: | | |
| 265b2fb6-2cf0-4859-9bc8-b24c00ab4378 > NUGET_API_KEY | |
| - name: Upload to NuGet.org | |
| run: | | |
| dotnet nuget push "nuget-packages/*.nupkg" --api-key "$NUGET_API_KEY" --source https://api.nuget.org/v3/index.json --skip-duplicate | |
| echo "Version: ${{ needs.pack.outputs.version }}" |