1515 type : boolean
1616 default : true
1717
18+ env :
19+ NFPM_VERSION : " 2.43.1"
20+
1821concurrency :
1922 # make publishing release concurrent (but others trigger not)
2023 group : building-releases-${{ inputs.publish-release && 'prerelease' || github.run_id }}
@@ -240,9 +243,13 @@ jobs:
240243 name : RHEL Zip
241244 path : ./package/quarto-${{needs.configure.outputs.version}}-linux-rhel7-amd64.tar.gz
242245
243- make-installer-arm64-deb :
246+ make-installer-linux :
244247 runs-on : ubuntu-latest
245248 needs : [configure]
249+ strategy :
250+ matrix :
251+ arch : [x86_64, aarch64]
252+ format : [deb, rpm]
246253 steps :
247254 - uses : actions/checkout@v4
248255 with :
@@ -256,57 +263,47 @@ jobs:
256263 run : |
257264 ./configure.sh
258265
259- - name : Prepare Distribution
260- run : |
261- pushd package/src/
262- ./quarto-bld prepare-dist --set-version ${{needs.configure.outputs.version}} --arch aarch64 --log-level info
263- popd
264-
265- - name : Make Installer
266- run : |
267- pushd package/src/
268- ./quarto-bld make-installer-deb --set-version ${{needs.configure.outputs.version}} --arch aarch64 --log-level info
269- popd
270-
271- - name : Upload Artifact
272- uses : actions/upload-artifact@v4
273- with :
274- name : Deb Arm64 Installer
275- path : ./package/out/quarto-${{needs.configure.outputs.version}}-linux-arm64.deb
276-
277- make-installer-deb :
278- runs-on : ubuntu-latest
279- needs : [configure]
280- steps :
281- - uses : actions/checkout@v4
282- with :
283- ref : ${{ needs.configure.outputs.version_commit }}
284-
285- - name : Prevent Re-run
286- if : ${{ inputs.publish-release }}
287- uses : ./.github/workflows/actions/prevent-rerun
288-
289- - name : Configure
266+ - name : Install nfpm
290267 run : |
291- ./configure.sh
268+ wget -q https://github.com/goreleaser/nfpm/releases/download/v${NFPM_VERSION}/nfpm_${NFPM_VERSION}_Linux_x86_64.tar.gz
269+ tar -xzf nfpm_${NFPM_VERSION}_Linux_x86_64.tar.gz
270+ sudo mv nfpm /usr/local/bin/
271+ nfpm --version
292272
293273 - name : Prepare Distribution
294274 run : |
295275 pushd package/src/
296- ./quarto-bld prepare-dist --set-version ${{needs.configure.outputs.version}} --log-level info
276+ ./quarto-bld prepare-dist --set-version ${{needs.configure.outputs.version}} ${{ matrix.arch == 'aarch64' && '--arch aarch64' || '' }} --log-level info
297277 popd
298278
299279 - name : Make Installer
300280 run : |
301281 pushd package/src/
302- ./quarto-bld make-installer-deb --set-version ${{needs.configure.outputs.version}} --log-level info
282+ ./quarto-bld make-installer-${{ matrix.format }} --set-version ${{needs.configure.outputs.version}} ${{ matrix.arch == 'aarch64' && '--arch aarch64' || '' }} --log-level info
303283 popd
304284
285+ - name : Set package architecture name
286+ id : pkg_arch
287+ run : |
288+ if [ "${{ matrix.format }}" == "deb" ]; then
289+ if [ "${{ matrix.arch }}" == "x86_64" ]; then
290+ echo "arch_name=amd64" >> $GITHUB_OUTPUT
291+ else
292+ echo "arch_name=arm64" >> $GITHUB_OUTPUT
293+ fi
294+ else
295+ if [ "${{ matrix.arch }}" == "x86_64" ]; then
296+ echo "arch_name=x86_64" >> $GITHUB_OUTPUT
297+ else
298+ echo "arch_name=aarch64" >> $GITHUB_OUTPUT
299+ fi
300+ fi
301+
305302 - name : Upload Artifact
306303 uses : actions/upload-artifact@v4
307304 with :
308- name : Deb Installer
309- path : ./package/out/quarto-${{needs.configure.outputs.version}}-linux-amd64.deb
305+ name : Linux-${{ matrix.format }}-${{ matrix.arch }}- Installer
306+ path : ./package/out/quarto-${{needs.configure.outputs.version}}-linux-${{ steps.pkg_arch.outputs.arch_name }}.${{ matrix.format }}
310307
311308 test-tarball-linux :
312309 runs-on : ubuntu-latest
@@ -593,8 +590,7 @@ jobs:
593590 runs-on : ubuntu-latest
594591 needs : [
595592 configure,
596- make-installer-deb,
597- make-installer-arm64-deb,
593+ make-installer-linux,
598594 make-installer-win,
599595 make-installer-mac,
600596 # optional in release to not be blocked by RHEL build depending on conda-forge deno dependency
@@ -660,13 +656,21 @@ jobs:
660656 sha256sum quarto-${{needs.configure.outputs.version}}-linux-arm64.tar.gz >> ../quarto-${{needs.configure.outputs.version}}-checksums.txt
661657 popd
662658
663- pushd Deb\ Installer
659+ pushd Linux-deb-x86_64- Installer
664660 sha256sum quarto-${{needs.configure.outputs.version}}-linux-amd64.deb >> ../quarto-${{needs.configure.outputs.version}}-checksums.txt
665661 popd
666662
667- pushd Deb\ Arm64\ Installer
663+ pushd Linux-deb-aarch64- Installer
668664 sha256sum quarto-${{needs.configure.outputs.version}}-linux-arm64.deb >> ../quarto-${{needs.configure.outputs.version}}-checksums.txt
669- popd
665+ popd
666+
667+ pushd Linux-rpm-x86_64-Installer
668+ sha256sum quarto-${{needs.configure.outputs.version}}-linux-x86_64.rpm >> ../quarto-${{needs.configure.outputs.version}}-checksums.txt
669+ popd
670+
671+ pushd Linux-rpm-aarch64-Installer
672+ sha256sum quarto-${{needs.configure.outputs.version}}-linux-aarch64.rpm >> ../quarto-${{needs.configure.outputs.version}}-checksums.txt
673+ popd
670674
671675 pushd Source
672676 sha256sum quarto-${{needs.configure.outputs.version}}.tar.gz >> ../quarto-${{needs.configure.outputs.version}}-checksums.txt
@@ -690,8 +694,10 @@ jobs:
690694 ./Deb Zip/quarto-${{needs.configure.outputs.version}}-linux-amd64.tar.gz
691695 ./Deb Arm64 Zip/quarto-${{needs.configure.outputs.version}}-linux-arm64.tar.gz
692696 ./RHEL Zip/quarto-${{needs.configure.outputs.version}}-linux-rhel7-amd64.tar.gz
693- ./Deb Installer/quarto-${{needs.configure.outputs.version}}-linux-amd64.deb
694- ./Deb Arm64 Installer/quarto-${{needs.configure.outputs.version}}-linux-arm64.deb
697+ ./Linux-deb-x86_64-Installer/quarto-${{needs.configure.outputs.version}}-linux-amd64.deb
698+ ./Linux-deb-aarch64-Installer/quarto-${{needs.configure.outputs.version}}-linux-arm64.deb
699+ ./Linux-rpm-x86_64-Installer/quarto-${{needs.configure.outputs.version}}-linux-x86_64.rpm
700+ ./Linux-rpm-aarch64-Installer/quarto-${{needs.configure.outputs.version}}-linux-aarch64.rpm
695701 ./Windows Installer/quarto-${{needs.configure.outputs.version}}-win.msi
696702 ./Windows Zip/quarto-${{needs.configure.outputs.version}}-win.zip
697703 ./Mac Installer/quarto-${{needs.configure.outputs.version}}-macos.pkg
@@ -703,8 +709,7 @@ jobs:
703709 if : ${{ (failure() || cancelled()) && inputs.publish-release }}
704710 needs : [
705711 configure,
706- make-installer-deb,
707- make-installer-arm64-deb,
712+ make-installer-linux,
708713 make-installer-win,
709714 make-installer-mac,
710715 # optional in release to not be blocked by RHEL build depending on conda-forge deno dependency
@@ -761,10 +766,62 @@ jobs:
761766
762767 - uses : ./.github/actions/docker
763768 with :
764- source : ./Deb Installer/quarto-${{needs.configure.outputs.version}}-linux-amd64.deb
769+ source : ./Linux-deb-x86_64- Installer/quarto-${{needs.configure.outputs.version}}-linux-amd64.deb
765770 version : ${{needs.configure.outputs.version}}
766771 token : ${{ secrets.GITHUB_TOKEN }}
767772 username : ${{ github.actor }}
768773 org : ${{ github.repository_owner }}
769774 name : quarto
770775 daily : ${{ inputs.pre-release }}
776+
777+ cloudsmith-push :
778+ if : ${{ inputs.publish-release }}
779+ runs-on : ubuntu-latest
780+ needs : [configure, publish-release]
781+ strategy :
782+ matrix :
783+ arch : [x86_64, aarch64]
784+ format : [deb, rpm]
785+ repo : [open, pro]
786+ steps :
787+ - uses : actions/checkout@v4
788+ with :
789+ sparse-checkout : |
790+ .github
791+
792+ - name : Prevent Re-run
793+ if : ${{ inputs.publish-release }}
794+ uses : ./.github/workflows/actions/prevent-rerun
795+
796+ - name : Download Artifacts
797+ uses : actions/download-artifact@v4
798+
799+ - name : Set package file name
800+ id : pkg_file
801+ run : |
802+ if [ "${{ matrix.format }}" == "deb" ]; then
803+ if [ "${{ matrix.arch }}" == "x86_64" ]; then
804+ echo "arch_name=amd64" >> $GITHUB_OUTPUT
805+ else
806+ echo "arch_name=arm64" >> $GITHUB_OUTPUT
807+ fi
808+ else
809+ if [ "${{ matrix.arch }}" == "x86_64" ]; then
810+ echo "arch_name=x86_64" >> $GITHUB_OUTPUT
811+ else
812+ echo "arch_name=aarch64" >> $GITHUB_OUTPUT
813+ fi
814+ fi
815+
816+ - name : Push ${{ matrix.format }} ${{ matrix.arch }} to Cloudsmith ${{ matrix.repo }}
817+ uses : cloudsmith-io/action@master
818+ with :
819+ api-key : ${{ secrets.CLOUDSMITH_API_KEY }}
820+ command : " push"
821+ format : " ${{ matrix.format }}"
822+ owner : " posit"
823+ repo : " ${{ matrix.repo }}"
824+ distro : " any-distro"
825+ release : " any-version"
826+ republish : " true"
827+ file : " ./Linux-${{ matrix.format }}-${{ matrix.arch }}-Installer/quarto-${{needs.configure.outputs.version}}-linux-${{ steps.pkg_file.outputs.arch_name }}.${{ matrix.format }}"
0 commit comments