|
85 | 85 | build/pkg/deb/debbuild/*.ddeb |
86 | 86 | build/pkg/deb/debbuild/*.tar.gz |
87 | 87 | build/pkg/deb/debbuild/*.dsc |
| 88 | + - name: Publish DEB packages to GitHub releases |
| 89 | + if: github.ref == 'refs/heads/master' |
| 90 | + env: |
| 91 | + GH_TOKEN: ${{ github.token }} |
| 92 | + IMAGE_NAME: ${{ matrix.image }} |
| 93 | + run: | |
| 94 | + curl -sL "$(curl -sL "https://api.github.com/repos/cli/cli/releases" | grep _linux_amd64.tar.gz | grep https | head -n1 | cut -d'"' -f4)" -o gh.tar.gz \ |
| 95 | + && tar xzf gh.tar.gz \ |
| 96 | + && find gh*/ -name gh -exec mv {} /usr/local/bin/ \; |
| 97 | + git config --global --add safe.directory "$PWD" \ |
| 98 | + && git tag -f ci-latest HEAD \ |
| 99 | + && git push -f origin tag ci-latest |
| 100 | + find build/ -iname '*.deb' | while read -r f; do |
| 101 | + newf="$IMAGE_NAME-$(basename "$f")" |
| 102 | + mv "$f" "$newf" |
| 103 | + gh release upload --clobber ci-latest "$newf" |
| 104 | + done |
88 | 105 |
|
89 | 106 | rpm: |
90 | 107 | # Try to build RPM packages |
@@ -200,3 +217,20 @@ jobs: |
200 | 217 | path: | |
201 | 218 | build/pkg/rpm/rpmbuild/RPMS/ |
202 | 219 | build/pkg/rpm/rpmbuild/SRPMS/ |
| 220 | + - name: Publish RPM packages to GitHub releases |
| 221 | + if: github.ref == 'refs/heads/master' |
| 222 | + env: |
| 223 | + GH_TOKEN: ${{ github.token }} |
| 224 | + IMAGE_NAME: ${{ matrix.image }} |
| 225 | + run: | |
| 226 | + curl -sL "$(curl -sL "https://api.github.com/repos/cli/cli/releases" | grep _linux_amd64.tar.gz | grep https | head -n1 | cut -d'"' -f4)" -o gh.tar.gz \ |
| 227 | + && tar xzf gh.tar.gz \ |
| 228 | + && find gh*/ -name gh -exec mv {} /usr/local/bin/ \; |
| 229 | + git config --global --add safe.directory "$PWD" \ |
| 230 | + && git tag -f ci-latest HEAD \ |
| 231 | + && git push -f origin tag ci-latest |
| 232 | + find build/ -iname '*.rpm' | while read -r f; do |
| 233 | + newf="$IMAGE_NAME-$(basename "$f")" |
| 234 | + mv "$f" "$newf" |
| 235 | + gh release upload --clobber ci-latest "$newf" |
| 236 | + done |
0 commit comments