浏览代码

Add workflow step to publish to CloudSmith

This change adds a workflow step to release the Debian packages to
CloudSmith, which will host Debian packages for Open Source projects for
free.
Fabian Mastenbroek 4 年之前
父节点
当前提交
e33e999d2c
共有 1 个文件被更改,包括 10 次插入1 次删除
  1. 10 1
      .github/workflows/release.yml

+ 10 - 1
.github/workflows/release.yml

@@ -49,7 +49,7 @@ jobs:
         path: "*.deb"
    publish:
     name: Publish
-    runs-on: [ubuntu-latest]
+    runs-on: ubuntu-latest
     if: ${{ github.event_name == 'workflow_dispatch' || github.event.pull_request.merged == true }}
     needs: build
     steps:
@@ -81,3 +81,12 @@ jobs:
         body: ${{ steps.format_release.outputs.changelog }}
         token: ${{ secrets.PAT }}
         artifacts: "artifacts/debs-generic/pve-headers-*.deb,artifacts/debs-generic/linux-tools-*.deb,artifacts/debs-*/pve-kernel-*.deb"
+    - name: Release to CloudSmith
+      run: |
+        pip install --upgrade cloudsmith-cli
+        find artifacts/debs-generic \
+          -name '*.deb' \
+          -not -name "*dbgsym*" \
+          -exec cloudsmith push deb pve-edge/kernel/any-distro/any-version {} --republish \;
+      env:
+        CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}