From d9c727f2561fd3e513a45486c582600bfefbda46 Mon Sep 17 00:00:00 2001 From: Daniel Chalmers Date: Fri, 10 Jun 2022 19:54:13 -0500 Subject: [PATCH] Update GitHub workflows --- .github/workflows/build.yml | 16 ++++++++++++++++ .github/workflows/deploy.yml | 22 ++++++++++++++++++++++ .github/workflows/dotnet-desktop.yml | 23 ----------------------- 3 files changed, 38 insertions(+), 23 deletions(-) create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/deploy.yml delete mode 100644 .github/workflows/dotnet-desktop.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..6e88904 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,16 @@ +name: Build + +on: + push: + pull_request: + +jobs: + deploy: + runs-on: windows-latest + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-dotnet@v2 + + - name: Build + run: dotnet build diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..40e514a --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,22 @@ +name: Deploy + +on: + push: + tags: + - 'v*' + +jobs: + deploy: + runs-on: windows-latest + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-dotnet@v2 + + - name: Build + run: dotnet publish -o "publish" -c Release -r win-x64 + + - name: Create GitHub release + uses: softprops/action-gh-release@v1 + with: + files: "publish/*" diff --git a/.github/workflows/dotnet-desktop.yml b/.github/workflows/dotnet-desktop.yml deleted file mode 100644 index ce9842a..0000000 --- a/.github/workflows/dotnet-desktop.yml +++ /dev/null @@ -1,23 +0,0 @@ -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build: - runs-on: windows-latest - - steps: - - uses: actions/checkout@v2 - - - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 5.0.x - - - name: Build - run: dotnet build -c Release - - - uses: actions/upload-artifact@v2 - with: - path: 'DesktopClock/bin/Release/'