@marcel91200 / caddy Mirror · read-only / commits / 79f3af99
Fork 0

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS

Mirrored from https://github.com/Slazee/caddy.git

Synced Nov 14, 05:15 UTC

ci: Add pushing to cloudsmith (#3941)

* ci: Add pushing to cloudsmith * ci: Update comments, remove env TODO * ci: Fix Cloudsmith installation by setting PATH * docs: Add Cloudsmith attribution to README * ci: Switch to keeping armv7 as the armhf .deb

Francis Lavoie committed Dec 30, 2020 at 12:54 UTC 79f3af99275447058951bc27fc45b669868dde7e
2 files changed +60 -1
.github/workflows/release.yml
+55
@@ -41,6 +41,9 @@ jobs:
41 echo "::set-output name=short_sha::$(git rev-parse --short HEAD)"
42 echo "::set-output name=go_cache::$(go env GOCACHE)"
43
44 + # Add "pip install" CLI tools to PATH
45 + echo ~/.local/bin >> $GITHUB_PATH
46 +
47 # Parse semver
48 TAG=${GITHUB_REF/refs\/tags\//}
49 SEMVER_RE='[^0-9]*\([0-9]*\)[.]\([0-9]*\)[.]\([0-9]*\)\([0-9A-Za-z\.-]*\)'
@@ -53,6 +56,11 @@ jobs:
56 echo "::set-output name=tag_patch::${TAG_PATCH}"
57 echo "::set-output name=tag_special::${TAG_SPECIAL}"
58
59 + # Cloudsmith CLI tooling for pushing releases
60 + # See https://help.cloudsmith.io/docs/cli
61 + - name: Install Cloudsmith CLI
62 + run: pip install --upgrade cloudsmith-cli
63 +
64 - name: Validate commits and tag signatures
65 run: |
66
@@ -82,12 +90,59 @@ jobs:
90 TAG: ${{ steps.vars.outputs.version_tag }}
91
92 # Only publish on non-special tags (e.g. non-beta)
93 + # We will continue to push to Gemfury for the forseeable future, although
94 + # Cloudsmith is probably better, to not break things for existing users of Gemfury.
95 + # See https://gemfury.com/caddy/deb:caddy
96 - name: Publish .deb to Gemfury
97 if: ${{ steps.vars.outputs.tag_special == '' }}
98 env:
99 GEMFURY_PUSH_TOKEN: ${{ secrets.GEMFURY_PUSH_TOKEN }}
100 run: |
101 for filename in dist/*.deb; do
102 + # armv6 and armv7 are both "armhf" so we can skip the duplicate
103 + if [[ "$filename" == *"armv6"* ]]; then
104 + echo "Skipping $filename"
105 + continue
106 + fi
107 +
108 curl -F package=@"$filename" https://${GEMFURY_PUSH_TOKEN}:@push.fury.io/caddy/
109 done
110
111 + # Publish only special tags (unstable/beta/rc) to the "testing" repo
112 + # See https://cloudsmith.io/~caddy/repos/testing/
113 + - name: Publish .deb to Cloudsmith (special tags)
114 + if: ${{ steps.vars.outputs.tag_special != '' }}
115 + env:
116 + CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
117 + run: |
118 + for filename in dist/*.deb; do
119 + # armv6 and armv7 are both "armhf" so we can skip the duplicate
120 + if [[ "$filename" == *"armv6"* ]]; then
121 + echo "Skipping $filename"
122 + continue
123 + fi
124 +
125 + echo "Pushing $filename to 'testing'"
126 + cloudsmith push deb caddy/testing/any-distro/any-version $filename
127 + done
128 +
129 + # Publish stable tags to Cloudsmith to both repos, "stable" and "testing"
130 + # See https://cloudsmith.io/~caddy/repos/stable/
131 + - name: Publish .deb to Cloudsmith (stable tags)
132 + if: ${{ steps.vars.outputs.tag_special == '' }}
133 + env:
134 + CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
135 + run: |
136 + for filename in dist/*.deb; do
137 + # armv6 and armv7 are both "armhf" so we can skip the duplicate
138 + if [[ "$filename" == *"armv6"* ]]; then
139 + echo "Skipping $filename"
140 + continue
141 + fi
142 +
143 + echo "Pushing $filename to 'stable'"
144 + cloudsmith push deb caddy/stable/any-distro/any-version $filename
145 +
146 + echo "Pushing $filename to 'testing'"
147 + cloudsmith push deb caddy/testing/any-distro/any-version $filename
148 + done
README.md
+5 -1
@@ -12,7 +12,9 @@
12 <br>
13 <a href="https://twitter.com/caddyserver" title="@caddyserver on Twitter"><img src="https://img.shields.io/badge/twitter-@caddyserver-55acee.svg" alt="@caddyserver on Twitter"></a>
14 <a href="https://caddy.community" title="Caddy Forum"><img src="https://img.shields.io/badge/community-forum-ff69b4.svg" alt="Caddy Forum"></a>
15 + <br>
16 <a href="https://sourcegraph.com/github.com/caddyserver/caddy?badge" title="Caddy on Sourcegraph"><img src="https://sourcegraph.com/github.com/caddyserver/caddy/-/badge.svg" alt="Caddy on Sourcegraph"></a>
17 + <a href="https://cloudsmith.io/~caddy/repos/"><img src="https://img.shields.io/badge/OSS%20hosting%20by-cloudsmith-blue?logo=cloudsmith" alt="Cloudsmith"></a>
18 </p>
19 <p align="center">
20 <a href="https://github.com/caddyserver/caddy/releases">Releases</a> ·
@@ -187,4 +189,6 @@ Please use our [issue tracker](https://github.com/caddyserver/caddy/issues) only
189 - _Project on Twitter: [@caddyserver](https://twitter.com/caddyserver)_
190 - _Author on Twitter: [@mholt6](https://twitter.com/mholt6)_
191
190 -Caddy is a project of [ZeroSSL](https://zerossl.com), an [apilayer](https://apilayer.com) company.
\ No newline at end of file
192 +Caddy is a project of [ZeroSSL](https://zerossl.com), an [apilayer](https://apilayer.com) company.
193 +
194 +Debian package repository hosting is graciously provided by [Cloudsmith](https://cloudsmith.com). Cloudsmith is the only fully hosted, cloud-native, universal package management solution, that enables your organization to create, store and share packages in any format, to any place, with total confidence.
\ No newline at end of file