소스 검색

Update GitHub workflows

Daniel Chalmers 3 년 전
부모
커밋
d9c727f256
3개의 변경된 파일38개의 추가작업 그리고 23개의 파일을 삭제
  1. 16 0
      .github/workflows/build.yml
  2. 22 0
      .github/workflows/deploy.yml
  3. 0 23
      .github/workflows/dotnet-desktop.yml

+ 16 - 0
.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

+ 22 - 0
.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/*"

+ 0 - 23
.github/workflows/dotnet-desktop.yml

@@ -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/'