From e33e999d2cbf90aad7b3cfef1804a840a39f923f Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Sun, 13 Jun 2021 15:25:50 +0200 Subject: [PATCH] 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. --- .github/workflows/release.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8f5958f..7f916d6 100644 --- a/.github/workflows/release.yml +++ b/.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 }}