Skip to content

Target .NET 8 instead of 7, which is no longer supported. Update depe… #22

Target .NET 8 instead of 7, which is no longer supported. Update depe…

Target .NET 8 instead of 7, which is no longer supported. Update depe… #22

Workflow file for this run

name: .NET
on:
push:
branches: [ master ]
workflow_dispatch:
jobs:
build:
env:
ProjectName: DryerDuty
runs-on: ubuntu-latest
steps:
- name: Clone
uses: actions/checkout@v4
- name: Initialize test reporting
uses: testspace-com/setup-testspace@v1
with:
domain: ${{ github.repository_owner }}
- name: Restore
run: dotnet restore --locked-mode
- name: Build
run: |
dotnet build ${{ env.ProjectName }} --no-restore --configuration Release --runtime linux-arm --no-self-contained
dotnet build ${{ env.ProjectName }} --no-restore --configuration Release --runtime linux-arm64 --no-self-contained
- name: Publish
run: |
dotnet publish ${{ env.ProjectName }} --no-build --configuration Release -p:PublishSingleFile=true --runtime linux-arm --no-self-contained
dotnet publish ${{ env.ProjectName }} --no-build --configuration Release -p:PublishSingleFile=true --runtime linux-arm64 --no-self-contained
- name: Test
shell: bash
run: |
dotnet test --configuration Release --collect:"XPlat Code Coverage" --settings Tests/Tests.runsettings --logger "trx;LogFileName=TestResults.xml"
echo "TEST_EXIT_CODE=$?" >> $GITHUB_ENV
cp Tests/TestResults/*/coverage.info Tests/TestResults
exit 0
- name: Upload test report
run: testspace Tests/TestResults/TestResults.xml
- name: Upload coverage
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: Tests/TestResults/coverage.info
- name: Stop if tests failed
run: exit ${{ env.TEST_EXIT_CODE }}
- name: Upload ARM32 artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ env.ProjectName }}-linux-arm32
path: |
${{ env.ProjectName }}/bin/Release/net8.0/linux-arm/publish/${{ env.ProjectName }}
${{ env.ProjectName }}/bin/Release/net8.0/linux-arm/publish/appsettings.json
${{ env.ProjectName }}/bin/Release/net8.0/linux-arm/publish/*.service
${{ env.ProjectName }}/bin/Release/net8.0/linux-arm/publish/*.so
if-no-files-found: error
- name: Upload ARM64 artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ env.ProjectName }}-linux-arm64
path: |
${{ env.ProjectName }}/bin/Release/net8.0/linux-arm64/publish/${{ env.ProjectName }}
${{ env.ProjectName }}/bin/Release/net8.0/linux-arm64/publish/appsettings.json
${{ env.ProjectName }}/bin/Release/net8.0/linux-arm64/publish/*.service
${{ env.ProjectName }}/bin/Release/net8.0/linux-arm64/publish/*.so
if-no-files-found: error