Skip to content

fix: auto-register all IKVM assemblies on assembly load #33

fix: auto-register all IKVM assemblies on assembly load

fix: auto-register all IKVM assemblies on assembly load #33

Workflow file for this run

name: CI
on:
push:
branches:
- main
- master
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
build-test-security:
name: Build, Integration Tests, Security Scan
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 10.0.x
- name: Verify OpenSSH client tools
shell: pwsh
run: |
Get-Command "$env:WINDIR\System32\OpenSSH\sftp.exe"
Get-Command "$env:WINDIR\System32\OpenSSH\scp.exe"
Get-Command "$env:WINDIR\System32\OpenSSH\ssh-keygen.exe"
- name: Restore
shell: pwsh
run: |
dotnet restore ApacheMinaSSHD.NET.Bindings/ApacheMinaSSHD.NET.Bindings.csproj
dotnet restore ApacheMinaSSHD.NET.Wrapper/ApacheMinaSSHD.NET.Wrapper.csproj
dotnet restore ApacheMinaSSHD.NET.Wrapper.Tests/ApacheMinaSSHD.NET.Wrapper.Tests.csproj
dotnet restore SimpleSSHDSever/SimpleSSHDSever.csproj
- name: Build
shell: pwsh
run: |
dotnet build ApacheMinaSSHD.NET.Bindings/ApacheMinaSSHD.NET.Bindings.csproj -c Release --no-restore
dotnet build ApacheMinaSSHD.NET.Wrapper/ApacheMinaSSHD.NET.Wrapper.csproj -c Release --no-restore
dotnet build ApacheMinaSSHD.NET.Wrapper.Tests/ApacheMinaSSHD.NET.Wrapper.Tests.csproj -c Release --no-restore
dotnet build SimpleSSHDSever/SimpleSSHDSever.csproj -c Release --no-restore
- name: Unit tests
shell: pwsh
run: dotnet test ApacheMinaSSHD.NET.Wrapper.Tests/ApacheMinaSSHD.NET.Wrapper.Tests.csproj -c Release --no-build
- name: Public API guard
shell: pwsh
run: ./eng/verify-public-api.ps1 -Configuration Release
- name: XML documentation guard
shell: pwsh
run: ./eng/verify-xml-docs.ps1 -Configuration Release
- name: Pack validation
shell: pwsh
run: |
dotnet pack ApacheMinaSSHD.NET.Bindings/ApacheMinaSSHD.NET.Bindings.csproj -c Release --no-restore -o artifacts/nuget-ci /p:Version=0.0.0-ci.${{ github.run_number }} /p:PackageVersion=0.0.0-ci.${{ github.run_number }}
dotnet pack ApacheMinaSSHD.NET.Wrapper/ApacheMinaSSHD.NET.Wrapper.csproj -c Release --no-restore -o artifacts/nuget-ci /p:Version=0.0.0-ci.${{ github.run_number }} /p:PackageVersion=0.0.0-ci.${{ github.run_number }}
- name: Client integration and stress tests
shell: pwsh
run: dotnet run -c Release --no-build --project SimpleSSHDSever/SimpleSSHDSever.csproj -- --integration-tests
- name: Dependency and CVE scan
shell: pwsh
run: ./eng/security-scan.ps1
auto-tag:
name: Auto-increment version tag
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
needs: build-test-security
runs-on: windows-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
fetch-tags: true
- name: Increment and push tag
shell: pwsh
env:
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
run: |
git fetch --tags origin
$latestTag = git tag --list 'v*.*.*.*' --sort=-version:refname | Select-Object -First 1
if ([string]::IsNullOrWhiteSpace($latestTag)) {
$newTag = "v1.0.0.0"
}
else {
$parts = $latestTag.TrimStart('v') -split '\.'
$major = [int]$parts[0]
$minor = [int]$parts[1]
$patch = [int]$parts[2]
$revision = [int]$parts[3] + 1
$newTag = "v$major.$minor.$patch.$revision"
}
git config user.name "github-actions"
git config user.email "github-actions@github.com"
git tag $newTag
git remote set-url origin "https://x-access-token:$env:RELEASE_TOKEN@github.com/${{ github.repository }}.git"
git push origin $newTag
Write-Host "Created and pushed tag: $newTag"