From 43b9c81035263a3403ce7b525e745c266c7caf86 Mon Sep 17 00:00:00 2001 From: Johannes Kaufmann Date: Thu, 21 Nov 2024 21:09:52 +0100 Subject: [PATCH] github actions: publish deb packages --- .github/workflows/release.yml | 24 ++++++++++++++++++++++++ .goreleaser.yaml | 14 ++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ede2ab1..d7b7bf7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,6 +23,12 @@ jobs: with: fetch-depth: 0 + # Cloudsmith CLI tooling for pushing releases + # See https://help.cloudsmith.io/docs/cli + - name: Install Cloudsmith CLI + run: pip install --upgrade cloudsmith-cli + + - name: Run GoReleaser uses: goreleaser/goreleaser-action@v6 with: @@ -32,3 +38,21 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} TAP_GITHUB_TOKEN: ${{ secrets.TAP_GITHUB_TOKEN }} + + + # Publish to the "stable" repo on Cloudsmith + # See https://cloudsmith.io/~html-to-markdown/repos/stable/ + - name: Publish .deb to Cloudsmith + env: + CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }} + run: | + for filename in dist/*.deb; do + # armv6 and armv7 are both "armhf" so we can skip the duplicate + if [[ "$filename" == *"armv6"* ]]; then + echo "Skipping $filename" + continue + fi + + echo "Pushing $filename to 'stable'" + cloudsmith push deb html-to-markdown/stable/any-distro/any-version $filename + done diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 353fca0..6737775 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -45,6 +45,20 @@ brews: name: homebrew-tap token: "{{ .Env.TAP_GITHUB_TOKEN }}" +nfpms: + - id: default + package_name: html2markdown + + vendor: JohannesKaufmann + homepage: https://github.com/JohannesKaufmann/html-to-markdown + maintainer: Johannes Kaufmann + description: | + Convert HTML to Markdown. Even works with entire websites. + license: MIT + + formats: + - deb + changelog: sort: asc filters: