build: Avoid expanding secrets in a run block #349
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: Dotnet Windows build | |
| on: | |
| push: | |
| paths-ignore: | |
| - 'example/**' | |
| - '.github/workflows/*example*' | |
| pull_request: | |
| paths-ignore: | |
| - 'example/**' | |
| - '.github/workflows/*example*' | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup dotnet | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 8.0.x # SDK Version to use. | |
| - name: Setup MSBuild | |
| uses: microsoft/[email protected] | |
| with: | |
| vs-version: 17.1 # Visual Studio Version to use. | |
| - name: Setup VSTest | |
| uses: darenm/[email protected] | |
| - name: Cache Nuget packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.nuget/packages | |
| # Look to see if there is a cache hit for the corresponding requirements file | |
| key: ${{ runner.os }}-nuget-${{ secrets.CACHE_VERSION }}-${{ hashFiles('**/packages.lock.json') }} | |
| restore-keys: ${{ runner.os }}-nuget-${{ secrets.CACHE_VERSION }} | |
| - name: Install dependencies | |
| run: dotnet restore src/WebEid.Security.sln | |
| - name: Build | |
| run: msbuild src/WebEid.Security.sln /t:Build /p:Configuration=Release | |
| - name: Test | |
| run: vstest.console.exe src/WebEid.Security.Tests/bin/Release/net8.0/WebEID.Security.Tests.dll |