浏览代码

Update workflow

Daniel Chalmers 9 月之前
父节点
当前提交
4d0060fc83
共有 2 个文件被更改,包括 12 次插入6 次删除
  1. 3 4
      .github/actions/prepare-for-release/action.yml
  2. 9 2
      .github/workflows/deploy.yml

+ 3 - 4
.github/actions/prepare-for-release/action.yml

@@ -29,17 +29,16 @@ runs:
         dotnet tool install --global wix --version 4.0.6
         dotnet tool install --global wix --version 4.0.6
         for arch in ${{ inputs.archs }}; do
         for arch in ${{ inputs.archs }}; do
           dotnet publish ./DesktopClock/DesktopClock.csproj -o "publish/$arch" -c Release --os win --arch $arch -p:Version=${{ inputs.version }}
           dotnet publish ./DesktopClock/DesktopClock.csproj -o "publish/$arch" -c Release --os win --arch $arch -p:Version=${{ inputs.version }}
-          wix build Product.wxs -d MainExeSource="publish/$arch/DesktopClock.exe" -o "publish/$arch/DesktopClock-installer-${{ inputs.version }}-${arch}.msi"
+          wix build Product.wxs -d MainExeSource="publish/$arch/DesktopClock.exe" -o "publish/DesktopClock-${{ inputs.version }}-${arch}.msi"
         done
         done
 
 
     - name: Create Portable ZIPs
     - name: Create Portable ZIPs
       shell: pwsh
       shell: pwsh
       run: |
       run: |
         foreach ($arch in "${{ inputs.archs }}".Split(' ')) {
         foreach ($arch in "${{ inputs.archs }}".Split(' ')) {
-          Compress-Archive -Path "publish/$arch/DesktopClock.exe" -DestinationPath "publish/$arch/DesktopClock-portable-${{ inputs.version }}-$arch.zip"
+          Compress-Archive -Path "publish/$arch/DesktopClock.exe" -DestinationPath "publish/DesktopClock-${{ inputs.version }}-$arch.zip"
         }
         }
 
 
     - uses: actions/upload-artifact@v4
     - uses: actions/upload-artifact@v4
       with:
       with:
-        path: |
-          publish
+        path: "publish/*.zip,publish/*.msi"

+ 9 - 2
.github/workflows/deploy.yml

@@ -7,6 +7,10 @@ on:
         description: 'Version number for the app'
         description: 'Version number for the app'
         required: true
         required: true
         default: ''
         default: ''
+      updateRelease:
+        description: 'Update existing release'
+        required: true
+        default: 'false'
 
 
 jobs:
 jobs:
   deploy:
   deploy:
@@ -22,6 +26,9 @@ jobs:
       uses: ncipollo/release-action@v1
       uses: ncipollo/release-action@v1
       with:
       with:
         tag: "v${{ github.event.inputs.version }}"
         tag: "v${{ github.event.inputs.version }}"
-        artifacts: "publish/*/*.zip,publish/*/*.msi"
+        artifacts: "publish/*.zip,publish/*.msi"
         generateReleaseNotes: true
         generateReleaseNotes: true
-        prerelease: ${{ contains(github.event.inputs.version, 'preview') }}
+        prerelease: ${{ contains(github.event.inputs.version, 'preview') }}
+        allowUpdates: ${{ github.event.inputs.updateRelease }}
+        removeArtifacts: true
+        omitBodyDuringUpdate: true