Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/actions/prevent-rerun/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Prevent Workflow Re-run
description: Fails if the workflow is re-run (github.run_attempt > 1)
runs:
using: "composite"
steps:
- name: Prevent any re-run
if: ${{ github.run_attempt > 1 }}
run: |
echo "::error::Re-running jobs is not permitted. Please trigger a new build manually at https://github.com/quarto-dev/quarto-cli/actions/workflows/create-release.yml (click 'Run workflow'), or use the GitHub CLI: 'gh workflow run create-release.yml'"
exit 1
shell: bash
89 changes: 82 additions & 7 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,17 @@ jobs:
tag_name: v${{ steps.read-version.outputs.version_full }}
version_commit: ${{ steps.version_commit.outputs.commit_long_sha }}
pushed: ${{ steps.version_commit.outputs.pushed }}
tagged: ${{ steps.version_commit.outputs.tagged }}
tag_pushed: ${{ steps.version_commit.outputs.tag_pushed }}
if: github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository == 'quarto-dev/quarto-cli')
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Prevent Re-run
uses: ./.github/workflows/actions/prevent-rerun

# we _also_ need npm, specifically for webui/preview
- uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -99,6 +103,9 @@ jobs:
with:
ref: ${{ needs.configure.outputs.version_commit }}

- name: Prevent Re-run
uses: ./.github/workflows/actions/prevent-rerun

- name: Make Tarball
run: |
tar --owner=root --group=root -zcvf quarto-${{needs.configure.outputs.version}}.tar.gz *
Expand All @@ -117,6 +124,9 @@ jobs:
with:
ref: ${{ needs.configure.outputs.version_commit }}

- name: Prevent Re-run
uses: ./.github/workflows/actions/prevent-rerun

- name: Configure
run: |
./configure.sh
Expand Down Expand Up @@ -150,6 +160,9 @@ jobs:
with:
ref: ${{ needs.configure.outputs.version_commit }}

- name: Prevent Re-run
uses: ./.github/workflows/actions/prevent-rerun

- name: Configure
run: |
./configure.sh
Expand Down Expand Up @@ -183,6 +196,9 @@ jobs:
with:
ref: ${{ needs.configure.outputs.version_commit }}

- name: Prevent Re-run
uses: ./.github/workflows/actions/prevent-rerun

- name: Configure
run: |
./configure.sh
Expand Down Expand Up @@ -227,6 +243,9 @@ jobs:
with:
ref: ${{ needs.configure.outputs.version_commit }}

- name: Prevent Re-run
uses: ./.github/workflows/actions/prevent-rerun

- name: Configure
run: |
./configure.sh
Expand Down Expand Up @@ -257,6 +276,9 @@ jobs:
with:
ref: ${{ needs.configure.outputs.version_commit }}

- name: Prevent Re-run
uses: ./.github/workflows/actions/prevent-rerun

- name: Configure
run: |
./configure.sh
Expand All @@ -283,6 +305,15 @@ jobs:
runs-on: ubuntu-latest
needs: [configure, make-tarball]
steps:
- uses: actions/checkout@v4
with:
ref: ${{ needs.configure.outputs.version_commit }}
sparse-checkout: |
.github

- name: Prevent Re-run
uses: ./.github/workflows/actions/prevent-rerun

- uses: actions/download-artifact@v4
with:
name: Deb Zip
Expand All @@ -303,15 +334,17 @@ jobs:
needs: [configure]

steps:
- name: Configure Rust Tools
run: |
rustup.exe toolchain install 1.63.0 --component rustfmt --component clippy --no-self-update
rustup.exe default 1.63.0

- uses: actions/checkout@v4
with:
ref: ${{ needs.configure.outputs.version_commit }}

- name: Prevent Re-run
uses: ./.github/workflows/actions/prevent-rerun

- name: Configure Rust Tools
run: |
rustup.exe toolchain install 1.63.0 --component rustfmt --component clippy --no-self-update
rustup.exe default 1.63.0
- name: Configure
run: |
.\configure.cmd
Expand Down Expand Up @@ -383,6 +416,15 @@ jobs:
runs-on: windows-latest
needs: [configure, make-installer-win]
steps:
- uses: actions/checkout@v4
with:
ref: ${{ needs.configure.outputs.version_commit }}
sparse-checkout: |
.github

- name: Prevent Re-run
uses: ./.github/workflows/actions/prevent-rerun

- uses: actions/download-artifact@v4
with:
name: Windows Zip
Expand All @@ -403,6 +445,9 @@ jobs:
with:
ref: ${{ needs.configure.outputs.version_commit }}

- name: Prevent Re-run
uses: ./.github/workflows/actions/prevent-rerun

- name: Configure
run: |
./configure.sh
Expand Down Expand Up @@ -464,6 +509,15 @@ jobs:
runs-on: macos-latest
needs: [configure, make-installer-mac]
steps:
- uses: actions/checkout@v4
with:
ref: ${{ needs.configure.outputs.version_commit }}
sparse-checkout: |
.github

- name: Prevent Re-run
uses: ./.github/workflows/actions/prevent-rerun

- uses: actions/download-artifact@v4
with:
name: Mac Zip
Expand Down Expand Up @@ -499,6 +553,16 @@ jobs:
]

steps:
- uses: actions/checkout@v4
with:
ref: ${{ needs.configure.outputs.version_commit }}
path: quarto-cli
sparse-checkout: |
.github

- name: Prevent Re-run
uses: ./quarto-cli/.github/workflows/actions/prevent-rerun

- name: Download Artifacts
uses: actions/download-artifact@v4

Expand Down Expand Up @@ -601,6 +665,9 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Prevent Re-run
uses: ./.github/workflows/actions/prevent-rerun

- name: Revert commit of version.txt
if: ${{ needs.configure.outputs.pushed }}
run: |
Expand All @@ -614,7 +681,7 @@ jobs:
git push origin $GITHUB_REF_NAME

- name: Deleted created tag
if: ${{ needs.configure.outputs.tag_pushed }}
if: ${{ needs.configure.outputs.tagged && needs.configure.outputs.tag_pushed }}
run: |
git push --delete origin ${{ needs.configure.outputs.tag_name }}

Expand All @@ -623,10 +690,18 @@ jobs:
runs-on: ubuntu-latest
needs: [configure, publish-release]
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: |
.github

- name: Prevent Re-run
uses: ./.github/workflows/actions/prevent-rerun

- name: Download Artifacts
uses: actions/download-artifact@v4

- uses: quarto-dev/quarto-cli/.github/actions/docker@main
- uses: ./.github/actions/docker
with:
source: ./Deb Installer/quarto-${{needs.configure.outputs.version}}-linux-amd64.deb
version: ${{needs.configure.outputs.version}}
Expand Down
Loading