Update dotnet.yml to use Taggloo4 files #233
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
# 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: .NET Web Site and API | |
concurrency: | |
group: main | |
cancel-in-progress: true | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
Build: | |
permissions: write-all | |
runs-on: ubuntu-latest | |
environment: production | |
strategy: | |
matrix: | |
dotnet-version: ['8.0.x'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup .NET ${{ matrix.dotnet-version }} | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: ${{ matrix.dotnet-version }} | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --no-restore | |
- name: Test | |
run: dotnet test --logger trx --results-directory "TestResults-${{ matrix.dotnet-version }}" | |
- name: Upload dotnet test results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dotnet-results-${{ matrix.dotnet-version }} | |
path: TestResults-${{ matrix.dotnet-version }} | |
# Use always() to always run this step to publish test results when there are test failures | |
if: ${{ always() }} | |
- name: Publish Release build | |
run: dotnet publish -c Release -o ../dotnet-webapp -r linux-x64 --self-contained true /p:UseAppHost=true | |
- name: Prepare temporary folder for archive | |
run: mkdir ./deploy_net8_linux-x64 | |
- name: Copy built artefacts | |
run: cp -r ./Taggloo4.Web/bin/Release/net8.0/linux-x64/* deploy_net8_linux-x64 | |
- name: Compress | |
uses: TonyBogdanov/[email protected] | |
with: | |
args: zip -r ./deploy_net8_linux-x64.zip ./deploy_net8_linux-x64 -i * | |
- name: Create GitHub Release | |
uses: "marvinpinto/action-automatic-releases@latest" | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
automatic_release_tag: "latest" | |
prerelease: false | |
title: "Latest Build" | |
files: | | |
./deploy_net8_linux-x64.zip | |
README.md | |
CHANGELOG.md | |