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.
This commit is contained in:
Fabian Mastenbroek 2021-06-13 15:25:50 +02:00
parent 6ca487bca9
commit e33e999d2c
No known key found for this signature in database
GPG key ID: 405FC6F81F0A7B85

View file

@ -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 }}