Skip to content

Commit f818af8

Browse files
authored
Merge branch 'main' into fix/code-annotation-highlight-overflow
2 parents 68609a8 + 9c6d652 commit f818af8

565 files changed

Lines changed: 127204 additions & 99081 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/ISSUE_TEMPLATE/documentation.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ body:
2929
required: true
3030

3131
- type: textarea
32+
id: description
3233
attributes:
3334
label: Description
3435
description: Describe the issue, give feedback or suggest an improvement.
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Cleanup github runner caches on closed pull requests
2+
on:
3+
pull_request:
4+
types:
5+
- closed
6+
7+
jobs:
8+
cleanup:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
actions: write
12+
steps:
13+
- name: Cleanup
14+
run: |
15+
echo "::group::Fetching cache list for PR #${{ github.event.pull_request.number }}"
16+
echo "Branch ref: $BRANCH"
17+
18+
# Get full cache list with details for logging
19+
cacheList=$(gh cache list --ref $BRANCH --limit 100 --json id,key,sizeInBytes)
20+
cacheCount=$(echo "$cacheList" | jq '. | length')
21+
22+
echo "Found $cacheCount cache(s) for this PR"
23+
24+
if [ "$cacheCount" -gt 0 ]; then
25+
echo "Cache details:"
26+
echo "$cacheList" | jq -r '.[] | " - ID: \(.id) | Key: \(.key) | Size: \(.sizeInBytes | tonumber / 1024 / 1024 | floor)MB"'
27+
fi
28+
echo "::endgroup::"
29+
30+
if [ "$cacheCount" -eq 0 ]; then
31+
echo "No caches to delete"
32+
exit 0
33+
fi
34+
35+
# Extract just the IDs for deletion
36+
cacheKeysForPR=$(echo "$cacheList" | jq -r '.[].id')
37+
38+
## Setting this to not fail the workflow while deleting cache keys.
39+
set +e
40+
41+
echo "::group::Deleting caches"
42+
deleted=0
43+
failed=0
44+
45+
for cacheKey in $cacheKeysForPR
46+
do
47+
echo "Deleting cache ID: $cacheKey"
48+
if gh cache delete $cacheKey; then
49+
echo " ✓ Successfully deleted cache $cacheKey"
50+
((deleted++))
51+
else
52+
echo " ✗ Failed to delete cache $cacheKey"
53+
((failed++))
54+
fi
55+
done
56+
57+
echo "::endgroup::"
58+
59+
echo "::notice::Cache cleanup complete: $deleted deleted, $failed failed out of $cacheCount total"
60+
env:
61+
GH_TOKEN: ${{ github.token }}
62+
GH_REPO: ${{ github.repository }}
63+
BRANCH: refs/pull/${{ github.event.pull_request.number }}/merge

‎.github/workflows/create-release.yml‎

Lines changed: 62 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ on:
1515
type: boolean
1616
default: true
1717

18+
env:
19+
NFPM_VERSION: "2.43.1"
20+
1821
concurrency:
1922
# make publishing release concurrent (but others trigger not)
2023
group: building-releases-${{ inputs.publish-release && 'prerelease' || github.run_id }}
@@ -242,9 +245,13 @@ jobs:
242245
name: RHEL Zip
243246
path: ./package/quarto-${{needs.configure.outputs.version}}-linux-rhel7-amd64.tar.gz
244247

245-
make-installer-arm64-deb:
248+
make-installer-linux:
246249
runs-on: ubuntu-latest
247250
needs: [configure]
251+
strategy:
252+
matrix:
253+
arch: [x86_64, aarch64]
254+
format: [deb, rpm]
248255
steps:
249256
- uses: actions/checkout@v4
250257
with:
@@ -258,57 +265,47 @@ jobs:
258265
run: |
259266
./configure.sh
260267
261-
- name: Prepare Distribution
268+
- name: Install nfpm
262269
run: |
263-
pushd package/src/
264-
./quarto-bld prepare-dist --set-version ${{needs.configure.outputs.version}} --arch aarch64 --log-level info
265-
popd
266-
267-
- name: Make Installer
268-
run: |
269-
pushd package/src/
270-
./quarto-bld make-installer-deb --set-version ${{needs.configure.outputs.version}} --arch aarch64 --log-level info
271-
popd
272-
273-
- name: Upload Artifact
274-
uses: actions/upload-artifact@v4
275-
with:
276-
name: Deb Arm64 Installer
277-
path: ./package/out/quarto-${{needs.configure.outputs.version}}-linux-arm64.deb
278-
279-
make-installer-deb:
280-
runs-on: ubuntu-latest
281-
needs: [configure]
282-
steps:
283-
- uses: actions/checkout@v4
284-
with:
285-
ref: ${{ needs.configure.outputs.version_commit }}
286-
287-
- name: Prevent Re-run
288-
if: ${{ inputs.publish-release }}
289-
uses: ./.github/workflows/actions/prevent-rerun
290-
291-
- name: Configure
292-
run: |
293-
./configure.sh
270+
wget -q https://github.com/goreleaser/nfpm/releases/download/v${NFPM_VERSION}/nfpm_${NFPM_VERSION}_Linux_x86_64.tar.gz
271+
tar -xzf nfpm_${NFPM_VERSION}_Linux_x86_64.tar.gz
272+
sudo mv nfpm /usr/local/bin/
273+
nfpm --version
294274
295275
- name: Prepare Distribution
296276
run: |
297277
pushd package/src/
298-
./quarto-bld prepare-dist --set-version ${{needs.configure.outputs.version}} --log-level info
278+
./quarto-bld prepare-dist --set-version ${{needs.configure.outputs.version}} ${{ matrix.arch == 'aarch64' && '--arch aarch64' || '' }} --log-level info
299279
popd
300280
301281
- name: Make Installer
302282
run: |
303283
pushd package/src/
304-
./quarto-bld make-installer-deb --set-version ${{needs.configure.outputs.version}} --log-level info
284+
./quarto-bld make-installer-${{ matrix.format }} --set-version ${{needs.configure.outputs.version}} ${{ matrix.arch == 'aarch64' && '--arch aarch64' || '' }} --log-level info
305285
popd
306286
287+
- name: Set package architecture name
288+
id: pkg_arch
289+
run: |
290+
if [ "${{ matrix.format }}" == "deb" ]; then
291+
if [ "${{ matrix.arch }}" == "x86_64" ]; then
292+
echo "arch_name=amd64" >> $GITHUB_OUTPUT
293+
else
294+
echo "arch_name=arm64" >> $GITHUB_OUTPUT
295+
fi
296+
else
297+
if [ "${{ matrix.arch }}" == "x86_64" ]; then
298+
echo "arch_name=x86_64" >> $GITHUB_OUTPUT
299+
else
300+
echo "arch_name=aarch64" >> $GITHUB_OUTPUT
301+
fi
302+
fi
303+
307304
- name: Upload Artifact
308305
uses: actions/upload-artifact@v4
309306
with:
310-
name: Deb Installer
311-
path: ./package/out/quarto-${{needs.configure.outputs.version}}-linux-amd64.deb
307+
name: Linux-${{ matrix.format }}-${{ matrix.arch }}-Installer
308+
path: ./package/out/quarto-${{needs.configure.outputs.version}}-linux-${{ steps.pkg_arch.outputs.arch_name }}.${{ matrix.format }}
312309

313310
test-tarball-linux:
314311
runs-on: ubuntu-latest
@@ -595,8 +592,7 @@ jobs:
595592
runs-on: ubuntu-latest
596593
needs: [
597594
configure,
598-
make-installer-deb,
599-
make-installer-arm64-deb,
595+
make-installer-linux,
600596
make-installer-win,
601597
make-installer-mac,
602598
# optional in release to not be blocked by RHEL build depending on conda-forge deno dependency
@@ -662,13 +658,21 @@ jobs:
662658
sha256sum quarto-${{needs.configure.outputs.version}}-linux-arm64.tar.gz >> ../quarto-${{needs.configure.outputs.version}}-checksums.txt
663659
popd
664660
665-
pushd Deb\ Installer
661+
pushd Linux-deb-x86_64-Installer
666662
sha256sum quarto-${{needs.configure.outputs.version}}-linux-amd64.deb >> ../quarto-${{needs.configure.outputs.version}}-checksums.txt
667663
popd
668664
669-
pushd Deb\ Arm64\ Installer
665+
pushd Linux-deb-aarch64-Installer
670666
sha256sum quarto-${{needs.configure.outputs.version}}-linux-arm64.deb >> ../quarto-${{needs.configure.outputs.version}}-checksums.txt
671-
popd
667+
popd
668+
669+
pushd Linux-rpm-x86_64-Installer
670+
sha256sum quarto-${{needs.configure.outputs.version}}-linux-x86_64.rpm >> ../quarto-${{needs.configure.outputs.version}}-checksums.txt
671+
popd
672+
673+
pushd Linux-rpm-aarch64-Installer
674+
sha256sum quarto-${{needs.configure.outputs.version}}-linux-aarch64.rpm >> ../quarto-${{needs.configure.outputs.version}}-checksums.txt
675+
popd
672676
673677
pushd Source
674678
sha256sum quarto-${{needs.configure.outputs.version}}.tar.gz >> ../quarto-${{needs.configure.outputs.version}}-checksums.txt
@@ -692,8 +696,10 @@ jobs:
692696
./Deb Zip/quarto-${{needs.configure.outputs.version}}-linux-amd64.tar.gz
693697
./Deb Arm64 Zip/quarto-${{needs.configure.outputs.version}}-linux-arm64.tar.gz
694698
./RHEL Zip/quarto-${{needs.configure.outputs.version}}-linux-rhel7-amd64.tar.gz
695-
./Deb Installer/quarto-${{needs.configure.outputs.version}}-linux-amd64.deb
696-
./Deb Arm64 Installer/quarto-${{needs.configure.outputs.version}}-linux-arm64.deb
699+
./Linux-deb-x86_64-Installer/quarto-${{needs.configure.outputs.version}}-linux-amd64.deb
700+
./Linux-deb-aarch64-Installer/quarto-${{needs.configure.outputs.version}}-linux-arm64.deb
701+
./Linux-rpm-x86_64-Installer/quarto-${{needs.configure.outputs.version}}-linux-x86_64.rpm
702+
./Linux-rpm-aarch64-Installer/quarto-${{needs.configure.outputs.version}}-linux-aarch64.rpm
697703
./Windows Installer/quarto-${{needs.configure.outputs.version}}-win.msi
698704
./Windows Zip/quarto-${{needs.configure.outputs.version}}-win.zip
699705
./Mac Installer/quarto-${{needs.configure.outputs.version}}-macos.pkg
@@ -705,8 +711,7 @@ jobs:
705711
if: ${{ (failure() || cancelled()) && inputs.publish-release }}
706712
needs: [
707713
configure,
708-
make-installer-deb,
709-
make-installer-arm64-deb,
714+
make-installer-linux,
710715
make-installer-win,
711716
make-installer-mac,
712717
# optional in release to not be blocked by RHEL build depending on conda-forge deno dependency
@@ -763,10 +768,20 @@ jobs:
763768

764769
- uses: ./.github/actions/docker
765770
with:
766-
source: ./Deb Installer/quarto-${{needs.configure.outputs.version}}-linux-amd64.deb
771+
source: ./Linux-deb-x86_64-Installer/quarto-${{needs.configure.outputs.version}}-linux-amd64.deb
767772
version: ${{needs.configure.outputs.version}}
768773
token: ${{ secrets.GITHUB_TOKEN }}
769774
username: ${{ github.actor }}
770775
org: ${{ github.repository_owner }}
771776
name: quarto
772777
daily: ${{ inputs.pre-release }}
778+
779+
call-cloudsmith-publish:
780+
if: ${{ inputs.publish-release && ! (inputs.pre-release == true) }}
781+
needs: [configure, publish-release]
782+
uses: ./.github/workflows/publish-cloudsmith.yml
783+
with:
784+
version: ${{ needs.configure.outputs.tag_name }}
785+
dry-run: false
786+
secrets:
787+
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}

0 commit comments

Comments
 (0)