Fix for \packages endpoint #1381
This file contains 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: 'Test and verify branch' | |
on: | |
pull_request: | |
branches: | |
- main | |
- release | |
types: [ opened, synchronize, reopened, edited ] | |
push: | |
branches: | |
- main | |
- release | |
jobs: | |
run-unit-tests: | |
runs-on: ubuntu-latest | |
name: Run all project unit tests | |
permissions: | |
contents: write | |
pull-requests: write | |
actions: read | |
checks: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '8.0.x' | |
- name: Build | |
run: dotnet build --configuration Release | |
working-directory: src | |
- name: Test | |
run: dotnet test --logger "trx;LogFileName=test-results.trx" || true | |
working-directory: src | |
- name: upload test report | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-results | |
path: "**/test-results.trx" | |
test-docker-images: | |
runs-on: ubuntu-latest | |
name: Build all docker images | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build multi-architecture Docker image for AasxServerBlazor | |
uses: docker/build-push-action@v6 | |
with: | |
push: false | |
outputs: type=cacheonly | |
platforms: | | |
linux/amd64 | |
linux/arm/v6 | |
linux/arm/v7 | |
linux/arm64 | |
file: ./src/docker/Dockerfile-AasxServerBlazor | |
tags: adminshellio/aasx-server-blazor:test | |
- name: Build AasxServerBlazor-arm32 | |
uses: docker/build-push-action@v6 | |
with: | |
push: false | |
outputs: type=cacheonly | |
platforms: linux/arm/v7 | |
file: ./src/docker/Dockerfile-AasxServerBlazor | |
tags: adminshellio/aasx-server-blazor-arm32:test | |
- name: Build AasxServerBlazor-arm64 | |
uses: docker/build-push-action@v6 | |
with: | |
push: false | |
outputs: type=cacheonly | |
platforms: linux/arm64 | |
file: ./src/docker/Dockerfile-AasxServerBlazor | |
tags: adminshellio/aasx-server-blazor-arm64:test | |
- name: Build multi-architecture Docker image for AasxServerCore | |
uses: docker/build-push-action@v6 | |
with: | |
push: false | |
outputs: type=cacheonly | |
platforms: | | |
linux/amd64 | |
linux/arm/v6 | |
linux/arm/v7 | |
linux/arm64 | |
file: ./src/docker/Dockerfile-AasxServerAspNetCore | |
tags: adminshellio/aasx-server-core:test | |
- name: Build AasxServerCore-arm32 | |
uses: docker/build-push-action@v6 | |
with: | |
push: false | |
outputs: type=cacheonly | |
platforms: linux/arm/v7 | |
file: ./src/docker/Dockerfile-AasxServerAspNetCore | |
tags: adminshellio/aasx-server-core-arm32:test | |
- name: Build AasxServerCore-arm64 | |
uses: docker/build-push-action@v6 | |
with: | |
push: false | |
outputs: type=cacheonly | |
platforms: linux/arm64 | |
file: ./src/docker/Dockerfile-AasxServerAspNetCore | |
tags: adminshellio/aasx-server-core-arm64:test | |
check-release: | |
runs-on: windows-latest | |
name: Check that the whole project is buildable and attach packages to process | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set execution policy | |
run: Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process | |
shell: pwsh | |
- name: Set timestamp | |
id: set_timestamp | |
run: | | |
$current_time = $(date +'%Y-%m-%d-T-%H-%M-%S') | |
echo "timestamp=$current_time" >> $env:GITHUB_OUTPUT | |
Write-Host "The current timestamp is: $current_time" | |
- name: Extract branch name | |
id: extract_branch | |
run: | | |
git fetch --all | |
$commitSHA = git rev-parse HEAD | |
$branch = git branch -r --contains $commitSHA | Select-String -Pattern 'origin/' | Select-Object -First 1 | ForEach-Object { $_.Line -replace '.*origin/', '' } | ForEach-Object { $_.Trim() } | |
echo "branch=$branch" >> $env:GITHUB_OUTPUT | |
Write-Host "The current branch is: $branch" | |
shell: pwsh | |
- name: Generate Version Number | |
working-directory: src | |
id: generate_version_number | |
run: | | |
$branch = '${{ steps.extract_branch.outputs.branch }}' | |
$version = .\BuildVersionNumber.ps1 -suffix alpha -branch $branch -githubRunNumber ${{ github.run_number }} | |
echo "version=$version" >> $env:GITHUB_OUTPUT | |
Write-Host "The version name to build is: $version" | |
shell: pwsh | |
- name: Update version numbers in project | |
working-directory: src | |
run: | | |
$version = '${{ steps.generate_version_number.outputs.version }}' | |
Write-Host "Updating project versions to: $version" | |
.\UpdateProjectVersions.ps1 -version $version | |
shell: pwsh | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '8.0.x' | |
- name: Build release | |
working-directory: src | |
run: .\BuildForRelease.ps1 | |
shell: pwsh | |
- name: Package release | |
working-directory: src | |
run: | | |
$version = '${{ steps.generate_version_number.outputs.version }}' | |
mkdir -p artefacts/release/$version | |
Write-Host "Packaging for the release version: $version" | |
.\PackageRelease.ps1 -version $version | |
shell: pwsh | |
- name: Upload AasxServerBlazor | |
uses: actions/upload-artifact@v4 | |
with: | |
name: AasxServerBlazor.LATEST.${{ steps.generate_version_number.outputs.version }}.${{ steps.set_timestamp.outputs.timestamp }} | |
path: artefacts/release/${{ steps.generate_version_number.outputs.version }}/AasxServerBlazor.zip | |
if-no-files-found: error | |
- name: Upload AasxServerAspNetCore | |
uses: actions/upload-artifact@v4 | |
with: | |
name: AasxServerAspNetCore.LATEST.${{ steps.generate_version_number.outputs.version }}.${{ steps.set_timestamp.outputs.timestamp }} | |
path: artefacts/release/${{ steps.generate_version_number.outputs.version }}/AasxServerAspNetCore.zip | |
if-no-files-found: error | |