Skip to content

initial commit

initial commit #2

Workflow file for this run

# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: Build and Test
on:
# TODO: Uncomment this line
# push:
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
strategy:
matrix:
os: [windows-latest]
runs-on: ${{matrix.os}}
env:
CONFIGURATION: Release
permissions:
actions: write
artifact-metadata: write
checks: write
contents: write
pull-requests: write
outputs:
assemblySemVer: ${{ steps.version_step.outputs.assemblySemVer }}
GitVersion_FullSemVer: ${{ steps.version_step.outputs.GitVersion_FullSemVer }}
semVer: ${{ steps.version_step.outputs.semVer }}
steps:
- uses: actions/checkout@v5
with:
lfs: true
fetch-depth: 0
- id: setup
uses: ./.github/actions/setup
- uses: ./.github/actions/build
- name: Tag Commit
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
shell: pwsh
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
$tag = "v${{ steps.setup.outputs.GitVersion_FullSemVer }}"
git tag $tag
git push https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git $tag
test:
needs: build
runs-on: windows-latest
env:
CONFIGURATION: Release
permissions:
contents: read
issues: write
steps:
- uses: actions/checkout@v5
with:
lfs: true
fetch-depth: 0
- uses: ./.github/actions/setup
- uses: ./.github/actions/test
with:
assembly-semver: ${{ needs.build.outputs.assemblySemVer }}
gitversion-full-semver: ${{ needs.build.outputs.GitVersion_FullSemVer }}
benchmark:
needs: build
runs-on: windows-latest
env:
CONFIGURATION: Release
permissions:
contents: read
issues: write
steps:
- uses: actions/checkout@v5
with:
lfs: true
fetch-depth: 0
- uses: ./.github/actions/benchmark
lint-cs:
runs-on: windows-latest
steps:
- uses: actions/checkout@v5
with:
lfs: true
fetch-depth: 0
- uses: ./.github/actions/lint
codeql:
env:
CONFIGURATION: Release
runs-on: windows-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- uses: actions/checkout@v5
with:
lfs: true
fetch-depth: 0
- uses: ./.github/actions/codeql
docs-links:
runs-on: windows-latest
steps:
- uses: actions/checkout@v5
- name: Run link checker
shell: pwsh
run: pwsh -NoProfile -ExecutionPolicy Bypass -File scripts/check-doc-links.ps1
markdownlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install markdownlint-cli
run: npm install -g markdownlint-cli
- name: Run markdownlint
run: markdownlint "**/*.md" --ignore "**/bin/**" --ignore "**/obj/**"
pr-size:
if: github.event_name == 'pull_request'
runs-on: windows-latest
permissions:
contents: read
issues: read
steps:
- uses: actions/checkout@v5
with:
lfs: true
fetch-depth: 0
- uses: ./.github/actions/pr-size