Skip to content

Commit

Permalink
Update and rename dotnet.yml to deployment.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
enkama authored Oct 28, 2023
1 parent 60fc50b commit 534e714
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 28 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# 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 }}

28 changes: 0 additions & 28 deletions .github/workflows/dotnet.yml

This file was deleted.

0 comments on commit 534e714

Please sign in to comment.