Skip to content

Update and rename dotnet.yml to deployment.yml #1

Update and rename dotnet.yml to deployment.yml

Update and rename dotnet.yml to deployment.yml #1

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
permissions:
contents: write
name: .Deployment
on:
push:
tags:
- "automatisiertes-kopieren/v*.*.*.*"
env:
PROJECT_Path: Automatisiertes-Kopieren/Automatisertes-Kopieren.csproj
jobs:
deploy:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Restore dependencies
run: dotnet restore ${ env.PROJECT_PATH }
- name: Build
run: dotnet build ${ env.PROJECT_PATH } -c Release --no-restore
- name: Test
run: dotnet test ${ env.PROJECT_PATH } --no-build --verbosity normal
- name: Publish
run: dotnet publish ${ env.PROJECT_PATH } -c Release --self-contained -r win-x64 -p:PublishSingleFile=true
- name: Release
id: create_release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
tag_name: ${{ github.ref }}
env:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Release asset actions
uses: csexton/release-asset-action@v2
with:
github: ${{ secrets.GITHUB_TOKEN }}
pattern: Automatisiertes-Kopieren/bin/Release/net7.0-windows/win-x64/publish/*.exe
release-url: ${{ steps.create_release.outputs.upload_url }}