Move the samples to preview 2.0.301.4181 and adopt what it added (#879) #931
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
| # A CodeQL query for the UA .NET Standard-Samples project | |
| name: "CodeQL" | |
| on: | |
| push: | |
| branches: [ master, main ] | |
| pull_request: | |
| # The branches below must be a subset of the branches above | |
| branches: [ master, main ] | |
| paths: | |
| - '**.cs' | |
| schedule: | |
| - cron: '30 6 * * 6' | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| analyze: | |
| name: Analyze | |
| runs-on: windows-2025-vs2026 | |
| permissions: | |
| actions: read | |
| contents: read | |
| # read the OPC UA preview packages from the OPC Foundation GitHub | |
| # Packages feed declared in Nuget.Config | |
| packages: read | |
| security-events: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| language: [ 'csharp' ] | |
| # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] | |
| # Learn more: | |
| # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v7 | |
| # Initializes the CodeQL tools for scanning. | |
| - name: Initialize CodeQL | |
| uses: github/codeql-action/init@v4.37.9 | |
| with: | |
| languages: ${{ matrix.language }} | |
| # If you wish to specify custom queries, you can do so here or in a config file. | |
| # By default, queries listed here will override any specified in a config file. | |
| # Prefix the list here with "+" to use these queries and those in the config file. | |
| # queries: ./path/to/local/query, your-org/your-repo/queries@main | |
| - name: Set up .NET | |
| uses: actions/setup-dotnet@v6 | |
| with: | |
| dotnet-version: '10.x' | |
| # Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild | |
| - name: Setup MSBuild.exe | |
| uses: microsoft/setup-msbuild@v3.0.0 | |
| # The preview packages come from the OPC Foundation GitHub Packages feed, | |
| # which requires authentication even though it is public. The workflow | |
| # token is enough to read public packages; the credentials are written | |
| # into the checked-out Nuget.Config, which the restores below read. | |
| - name: Authenticate GitHub Packages | |
| run: dotnet nuget update source opcfoundation-github --username "${{ github.actor }}" --password "${{ secrets.GITHUB_TOKEN }}" --store-password-in-clear-text --configfile Nuget.Config | |
| - name: Restore Packages | |
| run: | | |
| nuget restore "UA Quickstart Applications.sln" | |
| nuget restore "UA Sample Applications.sln" | |
| - name: Build Solution | |
| run: | | |
| msbuild.exe "UA Quickstart Applications.sln" /p:configuration="Release" /p:UseSharedCompilation=false | |
| msbuild.exe "UA Sample Applications.sln" /p:configuration="Release" /p:UseSharedCompilation=false | |
| - name: Perform CodeQL Analysis | |
| uses: github/codeql-action/analyze@v4.37.9 |