Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥
TypeScript aiai-agentsai-crawlerai-scrapingai-searchcrawlerdata-extractionhtml-to-markdownllmmarkdownscraperscrapingweb-crawlerweb-dataweb-data-extractionweb-scraperweb-scrapingweb-searchwebscraping
ci: show a release summary and supersede unapproved release runs (#5413)
capy-ai[bot]604eb26e3fe0
diff --git a/.github/actions/release-summary/action.yml b/.github/actions/release-summary/action.ymlnew file mode 100644index 000000000..b7e395558--- /dev/null+++ b/.github/actions/release-summary/action.yml@@ -0,0 +1,34 @@+name: Release summary+description: Writes what approving this run's gated job would ship to the job summary.+inputs:+ gated-job:+ description: Name of the environment-gated job as it appears on the run page.+ required: true+ version:+ description: Version or image tag the gated job publishes.+ required: true+ paths:+ description: Space-separated pathspecs that limit the listed changes to one package.+ required: false+ default: ""+ published-step:+ description: Step of the gated job that only succeeds when something was published. Earlier runs where it was skipped do not count as releases.+ required: false+ default: ""+ publishes:+ description: Set to false when the gated job will find nothing new to publish.+ required: false+ default: ""+runs:+ using: composite+ steps:+ - name: Write the release summary+ shell: bash+ env:+ GH_TOKEN: ${{ github.token }}+ GATED_JOB: ${{ inputs.gated-job }}+ VERSION: ${{ inputs.version }}+ PATHS: ${{ inputs.paths }}+ PUBLISHED_STEP: ${{ inputs.published-step }}+ PUBLISHES: ${{ inputs.publishes }}+ run: bash "$GITHUB_ACTION_PATH/summary.sh"diff --git a/.github/actions/release-summary/summary.sh b/.github/actions/release-summary/summary.shnew file mode 100644index 000000000..b6c27a6f1--- /dev/null+++ b/.github/actions/release-summary/summary.sh@@ -0,0 +1,115 @@+#!/usr/bin/env bash+# Needs a checkout with full history and a token with contents, actions and+# pull-requests read. Never fails the job: a release must not wait on this.+set -uo pipefail++repo="$GITHUB_REPOSITORY"+sha="$GITHUB_SHA"+web="$GITHUB_SERVER_URL/$repo"+workflow_file="${GITHUB_WORKFLOW_REF%@*}"+workflow_file="${workflow_file##*/}"+out="${GITHUB_STEP_SUMMARY:-/dev/stdout}"+max_commits=100+PATHS="${PATHS:-}"+PUBLISHED_STEP="${PUBLISHED_STEP:-}"+PUBLISHES="${PUBLISHES:-}"++cell() { printf '%s' "$1" | tr '\n' ' ' | sed 's/|/\\|/g'; }++prev=""+prev_run=""+while read -r id run_sha; do+ [ -n "$id" ] || continue+ git merge-base --is-ancestor "$run_sha" "$sha" 2>/dev/null || continue+ approved=$(gh api "repos/$repo/actions/runs/$id/jobs?filter=latest&per_page=100" |+ jq --arg n "$GATED_JOB" --arg s "$PUBLISHED_STEP" '[.jobs[]+ | select((.name == $n or (.name | startswith($n + " ("))) and .conclusion == "success")+ | select($s == "" or any(.steps[]?; .name == $s and .conclusion == "success"))] | length')+ if [ "${approved:-0}" -gt 0 ]; then+ prev="$run_sha"+ prev_run="$id"+ break+ fi+done < <(gh api "repos/$repo/actions/workflows/$workflow_file/runs?branch=$GITHUB_REF_NAME&status=completed&per_page=100" |+ jq -r --argjson n "$GITHUB_RUN_NUMBER" '.workflow_runs[] | select(.run_number < $n) | "\(.id) \(.head_sha)"')++subject=$(git log -1 --format=%s "$sha" 2>/dev/null)++{+ echo "## Release summary"+ echo+ if [ "$PUBLISHES" = false ]; then+ echo "Nothing new to publish: \`$(cell "$VERSION")\` is already released. Approving **$GATED_JOB** runs it without publishing."+ else+ echo "Approving **$GATED_JOB** publishes the version below from this commit."+ fi+ echo+ echo "| | |"+ echo "|---|---|"+ echo "| Version | \`$(cell "$VERSION")\` |"+ echo "| Commit | [\`${sha:0:10}\`]($web/commit/$sha) $(cell "$subject") |"+ if [ -n "$prev" ]; then+ tags=""+ for t in $(git tag --points-at "$prev"); do+ in_scope=${PATHS:+no}+ for p in $PATHS; do+ case "$t" in "${p%/}"/*) in_scope="" ;; esac+ done+ [ -z "$in_scope" ] && tags="${tags:+$tags, }$t"+ done+ echo "| Previously released | [\`${prev:0:10}\`]($web/commit/$prev)${tags:+ (tag $tags)}, released in [run $prev_run]($web/actions/runs/$prev_run) |"+ echo "| Compare | [${prev:0:10}...${sha:0:10}]($web/compare/$prev...$sha) |"+ else+ echo "| Previously released | none found in the last 100 completed runs of $workflow_file on $GITHUB_REF_NAME |"+ fi+ echo+} >> "$out"++[ -n "$prev" ] || exit 0++# shellcheck disable=SC2086+mapfile -t commits < <(git log --format=%H "$prev..$sha" -- $PATHS)+scope=""+[ -n "$PATHS" ] && scope=" touching \`$PATHS\`"++declare -A seen=()+pr_rows=()+direct=()+for c in "${commits[@]:0:$max_commits}"; do+ prs=$(gh api "repos/$repo/commits/$c/pulls" |+ jq -r '.[] | select(.merged_at != null) | [.number, .user.login, .title] | @tsv')+ if [ -z "$prs" ]; then+ direct+=("- [\`${c:0:10}\`]($web/commit/$c) $(git log -1 --format='%s (%an)' "$c")")+ continue+ fi+ while IFS=$'\t' read -r number author title; do+ [ -n "${seen[$number]:-}" ] && continue+ seen[$number]=1+ approvers=$(gh api "repos/$repo/pulls/$number/reviews?per_page=100" |+ jq -r '[.[] | select(.state == "APPROVED") | .user.login] | unique | join(", ")')+ pr_rows+=("| [#$number]($web/pull/$number) | $(cell "$title") | $author | ${approvers:-**none**} |")+ done <<< "$prs"+done++{+ echo "### Merged pull requests$scope (${#pr_rows[@]})"+ echo+ if [ "${#pr_rows[@]}" -gt 0 ]; then+ echo "| PR | Title | Author | Approved by |"+ echo "|---|---|---|---|"+ printf '%s\n' "${pr_rows[@]}"+ else+ echo "None."+ fi+ echo+ if [ "${#direct[@]}" -gt 0 ]; then+ echo "### Commits without a pull request (${#direct[@]})"+ echo+ printf '%s\n' "${direct[@]}"+ echo+ fi+ if [ "${#commits[@]}" -gt "$max_commits" ]; then+ echo "Only the newest $max_commits of ${#commits[@]} commits are listed. The compare link has the rest."+ fi+} >> "$out"+exit 0diff --git a/.github/actions/supersede-waiting-runs/action.yml b/.github/actions/supersede-waiting-runs/action.ymlnew file mode 100644index 000000000..978daecc0--- /dev/null+++ b/.github/actions/supersede-waiting-runs/action.yml@@ -0,0 +1,10 @@+name: Supersede unapproved release runs+description: Cancels earlier runs of this workflow on the same branch that are still waiting for environment approval and whose commit this run includes.+runs:+ using: composite+ steps:+ - name: Cancel superseded runs waiting for approval+ shell: bash+ env:+ GH_TOKEN: ${{ github.token }}+ run: bash "$GITHUB_ACTION_PATH/supersede.sh"diff --git a/.github/actions/supersede-waiting-runs/supersede.sh b/.github/actions/supersede-waiting-runs/supersede.shnew file mode 100644index 000000000..3493e2b91--- /dev/null+++ b/.github/actions/supersede-waiting-runs/supersede.sh@@ -0,0 +1,29 @@+#!/usr/bin/env bash+# Needs actions write and contents read. Only a run whose status is "waiting"+# (held at an environment approval) is cancelled; a job that has started is never touched.+set -uo pipefail++repo="$GITHUB_REPOSITORY"+web="$GITHUB_SERVER_URL/$repo"+workflow_file="${GITHUB_WORKFLOW_REF%@*}"+workflow_file="${workflow_file##*/}"+out="${GITHUB_STEP_SUMMARY:-/dev/stdout}"++while read -r id sha; do+ [ -n "$id" ] || continue+ relation=$(gh api "repos/$repo/compare/$sha...$GITHUB_SHA" --jq .status)+ case "$relation" in+ ahead | identical) ;;+ *) echo "Run $id on $sha is not included in $GITHUB_SHA ($relation); left waiting"; continue ;;+ esac+ state=$(gh api "repos/$repo/actions/runs/$id" --jq .status)+ if [ "$state" != waiting ]; then+ echo "Run $id is $state now; left alone"+ continue+ fi+ if gh run cancel "$id" -R "$repo"; then+ echo "- Cancelled [run $id]($web/actions/runs/$id), which was waiting for approval on \`${sha:0:10}\`. This run includes that commit." >> "$out"+ fi+done < <(gh api "repos/$repo/actions/workflows/$workflow_file/runs?branch=$GITHUB_REF_NAME&status=waiting&per_page=100" |+ jq -r --argjson n "$GITHUB_RUN_NUMBER" '.workflow_runs[] | select(.run_number < $n) | "\(.id) \(.head_sha)"')+exit 0diff --git a/.github/workflows/publish-dotnet-sdk.yml b/.github/workflows/publish-dotnet-sdk.ymlindex 7d35fe6d8..df6c97390 100644--- a/.github/workflows/publish-dotnet-sdk.yml+++ b/.github/workflows/publish-dotnet-sdk.yml@@ -11,11 +11,72 @@ on:permissions: {}jobs:+ supersede:+ name: Supersede unapproved runs+ if: github.ref == 'refs/heads/main'+ runs-on: ubuntu-latest+ permissions:+ actions: write+ contents: read+ steps:+ - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5+ continue-on-error: true+ with:+ sparse-checkout: .github/actions+ persist-credentials: false+ - uses: ./.github/actions/supersede-waiting-runs+ continue-on-error: true+ timeout-minutes: 2++ release-summary:+ name: Release summary+ if: github.ref == 'refs/heads/main'+ runs-on: ubuntu-latest+ permissions:+ contents: read+ actions: read+ pull-requests: read+ steps:+ - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5+ continue-on-error: true+ with:+ fetch-depth: 0+ filter: blob:none+ persist-credentials: false+ - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5+ continue-on-error: true+ with:+ python-version: '3.x'+ - name: Install version check dependencies+ continue-on-error: true+ run: |+ python -m pip install --no-cache-dir -r .github/pip-bootstrap.txt+ python -m pip install requests==2.34.2 packaging==26.3+ - name: Read the version+ id: version+ continue-on-error: true+ run: |+ echo "version=$(grep -oP '<Version>\K[^<]+' apps/dot-net-sdk/Firecrawl/Firecrawl.csproj)" >> "$GITHUB_OUTPUT"+ echo "publishes=$(python .github/scripts/check_version_has_incremented.py dotnet ./apps/dot-net-sdk/Firecrawl firecrawl-sdk)" >> "$GITHUB_OUTPUT"+ - uses: ./.github/actions/release-summary+ continue-on-error: true+ timeout-minutes: 3+ with:+ gated-job: Publish to NuGet+ version: firecrawl-sdk ${{ steps.version.outputs.version }}+ publishes: ${{ steps.version.outputs.publishes }}+ published-step: Publish to NuGet+ paths: apps/dot-net-sdk+publish:name: Publish to NuGet+ needs: release-summaryif: github.ref == 'refs/heads/main'runs-on: blacksmith-2vcpu-ubuntu-2404environment: release+ concurrency:+ group: ${{ github.workflow }}-release-${{ github.ref }}+ cancel-in-progress: falsepermissions:contents: readsteps:diff --git a/.github/workflows/publish-elixir-sdk.yml b/.github/workflows/publish-elixir-sdk.ymlindex 91adf9bc9..747e17d20 100644--- a/.github/workflows/publish-elixir-sdk.yml+++ b/.github/workflows/publish-elixir-sdk.yml@@ -143,10 +143,72 @@ jobs:--head "$BRANCH" \--base main+ supersede:+ name: Supersede unapproved runs+ if: github.event_name == 'push' && github.ref == 'refs/heads/main'+ runs-on: ubuntu-latest+ defaults:+ run:+ working-directory: .+ permissions:+ actions: write+ contents: read+ steps:+ - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5+ continue-on-error: true+ with:+ sparse-checkout: .github/actions+ persist-credentials: false+ - uses: ./.github/actions/supersede-waiting-runs+ continue-on-error: true+ timeout-minutes: 2++ release-summary:+ name: Release summary+ if: github.event_name == 'push' && github.ref == 'refs/heads/main'+ runs-on: ubuntu-latest+ defaults:+ run:+ working-directory: .+ permissions:+ contents: read+ actions: read+ pull-requests: read+ steps:+ - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5+ continue-on-error: true+ with:+ fetch-depth: 0+ filter: blob:none+ persist-credentials: false+ - name: Read the version+ id: version+ continue-on-error: true+ run: |+ local=$(grep '@version' apps/elixir-sdk/mix.exs | head -1 | sed 's/.*"\(.*\)".*/\1/')+ published=$(curl -fsS https://hex.pm/api/packages/firecrawl | jq -r '.releases[0].version // "0.0.0"')+ newest=$(printf '%s\n%s\n' "$local" "$published" | sort -V | tail -1)+ echo "version=$local" >> "$GITHUB_OUTPUT"+ if [ "$local" != "$published" ] && [ "$newest" = "$local" ]; then publishes=true; else publishes=false; fi+ echo "publishes=$publishes" >> "$GITHUB_OUTPUT"+ - uses: ./.github/actions/release-summary+ continue-on-error: true+ timeout-minutes: 3+ with:+ gated-job: publish+ version: firecrawl ${{ steps.version.outputs.version }} (hex.pm)+ publishes: ${{ steps.version.outputs.publishes }}+ published-step: Publish to hex.pm+ paths: apps/elixir-sdk+publish:+ needs: release-summaryif: github.event_name == 'push' && github.ref == 'refs/heads/main'runs-on: blacksmith-2vcpu-ubuntu-2404environment: release+ concurrency:+ group: ${{ github.workflow }}-release-${{ github.ref }}+ cancel-in-progress: falsepermissions:contents: readdiff --git a/.github/workflows/publish-go-sdk.yml b/.github/workflows/publish-go-sdk.ymlindex 0ef58335d..25006e93e 100644--- a/.github/workflows/publish-go-sdk.yml+++ b/.github/workflows/publish-go-sdk.yml@@ -19,11 +19,65 @@ on:permissions: {}jobs:+ supersede:+ name: Supersede unapproved runs+ if: github.ref == 'refs/heads/main'+ runs-on: ubuntu-latest+ permissions:+ actions: write+ contents: read+ steps:+ - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5+ continue-on-error: true+ with:+ sparse-checkout: .github/actions+ persist-credentials: false+ - uses: ./.github/actions/supersede-waiting-runs+ continue-on-error: true+ timeout-minutes: 2++ release-summary:+ name: Release summary+ if: github.ref == 'refs/heads/main'+ runs-on: ubuntu-latest+ permissions:+ contents: read+ actions: read+ pull-requests: read+ steps:+ - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5+ continue-on-error: true+ with:+ fetch-depth: 0+ filter: blob:none+ persist-credentials: false+ - name: Read the version+ id: version+ continue-on-error: true+ run: |+ version=$(grep -E '^const Version = ' apps/go-sdk/version.go | sed -E 's/.*"([^"]+)".*/\1/')+ echo "version=$version" >> "$GITHUB_OUTPUT"+ if git rev-parse -q --verify "refs/tags/apps/go-sdk/v$version" >/dev/null; then publishes=false; else publishes=true; fi+ echo "publishes=$publishes" >> "$GITHUB_OUTPUT"+ - uses: ./.github/actions/release-summary+ continue-on-error: true+ timeout-minutes: 3+ with:+ gated-job: Tag and index on pkg.go.dev+ version: apps/go-sdk/v${{ steps.version.outputs.version }}+ publishes: ${{ steps.version.outputs.publishes }}+ published-step: Create and push tag+ paths: apps/go-sdk+publish:name: Tag and index on pkg.go.dev+ needs: release-summaryif: github.ref == 'refs/heads/main'runs-on: blacksmith-2vcpu-ubuntu-2404environment: release+ concurrency:+ group: ${{ github.workflow }}-release-${{ github.ref }}+ cancel-in-progress: falsepermissions:contents: writesteps:diff --git a/.github/workflows/publish-java-sdk.yml b/.github/workflows/publish-java-sdk.ymlindex 12c95e125..a24f42742 100644--- a/.github/workflows/publish-java-sdk.yml+++ b/.github/workflows/publish-java-sdk.yml@@ -11,11 +11,72 @@ on:permissions: {}jobs:+ supersede:+ name: Supersede unapproved runs+ if: github.ref == 'refs/heads/main'+ runs-on: ubuntu-latest+ permissions:+ actions: write+ contents: read+ steps:+ - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5+ continue-on-error: true+ with:+ sparse-checkout: .github/actions+ persist-credentials: false+ - uses: ./.github/actions/supersede-waiting-runs+ continue-on-error: true+ timeout-minutes: 2++ release-summary:+ name: Release summary+ if: github.ref == 'refs/heads/main'+ runs-on: ubuntu-latest+ permissions:+ contents: read+ actions: read+ pull-requests: read+ steps:+ - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5+ continue-on-error: true+ with:+ fetch-depth: 0+ filter: blob:none+ persist-credentials: false+ - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5+ continue-on-error: true+ with:+ python-version: '3.x'+ - name: Install version check dependencies+ continue-on-error: true+ run: |+ python -m pip install --no-cache-dir -r .github/pip-bootstrap.txt+ python -m pip install requests==2.34.2 packaging==26.3+ - name: Read the version+ id: version+ continue-on-error: true+ run: |+ echo "version=$(sed -nE 's/^version *= *"([^"]+)".*/\1/p' apps/java-sdk/build.gradle.kts)" >> "$GITHUB_OUTPUT"+ echo "publishes=$(python .github/scripts/check_version_has_incremented.py java ./apps/java-sdk com.firecrawl:firecrawl-java)" >> "$GITHUB_OUTPUT"+ - uses: ./.github/actions/release-summary+ continue-on-error: true+ timeout-minutes: 3+ with:+ gated-job: Publish to Maven Central+ version: com.firecrawl:firecrawl-java ${{ steps.version.outputs.version }}+ publishes: ${{ steps.version.outputs.publishes }}+ published-step: Publish to Maven Central+ paths: apps/java-sdk+publish:name: Publish to Maven Central+ needs: release-summaryif: github.ref == 'refs/heads/main'runs-on: blacksmith-2vcpu-ubuntu-2404environment: release+ concurrency:+ group: ${{ github.workflow }}-release-${{ github.ref }}+ cancel-in-progress: falsepermissions:contents: readsteps:diff --git a/.github/workflows/publish-js-sdk.yml b/.github/workflows/publish-js-sdk.ymlindex 810255c89..13076b4c4 100644--- a/.github/workflows/publish-js-sdk.yml+++ b/.github/workflows/publish-js-sdk.yml@@ -58,12 +58,57 @@ jobs:if-no-files-found: errorretention-days: 7+ supersede:+ name: Supersede unapproved runs+ needs: build+ if: github.ref == 'refs/heads/main'+ runs-on: ubuntu-latest+ permissions:+ actions: write+ contents: read+ steps:+ - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5+ continue-on-error: true+ with:+ sparse-checkout: .github/actions+ persist-credentials: false+ - uses: ./.github/actions/supersede-waiting-runs+ continue-on-error: true+ timeout-minutes: 2++ release-summary:+ name: Release summary+ needs: build+ if: github.ref == 'refs/heads/main'+ runs-on: ubuntu-latest+ permissions:+ contents: read+ actions: read+ pull-requests: read+ steps:+ - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5+ continue-on-error: true+ with:+ fetch-depth: 0+ filter: blob:none+ persist-credentials: false+ - uses: ./.github/actions/release-summary+ continue-on-error: true+ timeout-minutes: 3+ with:+ gated-job: Publish+ version: firecrawl, @mendable/firecrawl-js and @mendable/firecrawl ${{ needs.build.outputs.version }}+ paths: apps/js-sdk/firecrawl+publish:name: Publish- needs: build+ needs: [build, release-summary]if: github.ref == 'refs/heads/main'runs-on: ubuntu-latestenvironment: release+ concurrency:+ group: ${{ github.workflow }}-release-${{ github.ref }}+ cancel-in-progress: falsepermissions:id-token: writesteps:diff --git a/.github/workflows/publish-php-sdk.yml b/.github/workflows/publish-php-sdk.ymlindex f062e60ab..8da173b4e 100644--- a/.github/workflows/publish-php-sdk.yml+++ b/.github/workflows/publish-php-sdk.yml@@ -12,11 +12,72 @@ on:permissions: {}jobs:+ supersede:+ name: Supersede unapproved runs+ if: github.ref == 'refs/heads/main'+ runs-on: ubuntu-latest+ permissions:+ actions: write+ contents: read+ steps:+ - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5+ continue-on-error: true+ with:+ sparse-checkout: .github/actions+ persist-credentials: false+ - uses: ./.github/actions/supersede-waiting-runs+ continue-on-error: true+ timeout-minutes: 2++ release-summary:+ name: Release summary+ if: github.ref == 'refs/heads/main'+ runs-on: ubuntu-latest+ permissions:+ contents: read+ actions: read+ pull-requests: read+ steps:+ - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5+ continue-on-error: true+ with:+ fetch-depth: 0+ filter: blob:none+ persist-credentials: false+ - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5+ continue-on-error: true+ with:+ python-version: '3.x'+ - name: Install version check dependencies+ continue-on-error: true+ run: |+ python -m pip install --no-cache-dir -r .github/pip-bootstrap.txt+ python -m pip install requests==2.34.2 packaging==26.3+ - name: Read the version+ id: version+ continue-on-error: true+ run: |+ echo "version=$(sed -nE "s/.*SDK_VERSION *= *['\"]([^'\"]+)['\"].*/\1/p" apps/php-sdk/src/Version.php)" >> "$GITHUB_OUTPUT"+ echo "publishes=$(python .github/scripts/check_version_has_incremented.py php ./apps/php-sdk firecrawl/firecrawl-sdk)" >> "$GITHUB_OUTPUT"+ - uses: ./.github/actions/release-summary+ continue-on-error: true+ timeout-minutes: 3+ with:+ gated-job: Publish to Packagist+ version: firecrawl/firecrawl-sdk ${{ steps.version.outputs.version }}+ publishes: ${{ steps.version.outputs.publishes }}+ published-step: Subtree split and push to firecrawl-php+ paths: apps/php-sdk+publish:name: Publish to Packagist+ needs: release-summaryif: github.ref == 'refs/heads/main'runs-on: blacksmith-2vcpu-ubuntu-2404environment: release+ concurrency:+ group: ${{ github.workflow }}-release-${{ github.ref }}+ cancel-in-progress: falsepermissions:contents: readsteps:diff --git a/.github/workflows/publish-python-sdk.yml b/.github/workflows/publish-python-sdk.ymlindex 3e52257bc..24b31c52e 100644--- a/.github/workflows/publish-python-sdk.yml+++ b/.github/workflows/publish-python-sdk.yml@@ -58,12 +58,62 @@ jobs:if-no-files-found: errorretention-days: 7+ supersede:+ name: Supersede unapproved runs+ needs: build+ if: needs.build.outputs.publish == 'true' && github.ref == 'refs/heads/main'+ runs-on: ubuntu-latest+ permissions:+ actions: write+ contents: read+ steps:+ - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5+ continue-on-error: true+ with:+ sparse-checkout: .github/actions+ persist-credentials: false+ - uses: ./.github/actions/supersede-waiting-runs+ continue-on-error: true+ timeout-minutes: 2++ release-summary:+ name: Release summary+ needs: build+ if: needs.build.outputs.publish == 'true' && github.ref == 'refs/heads/main'+ runs-on: ubuntu-latest+ permissions:+ contents: read+ actions: read+ pull-requests: read+ steps:+ - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5+ continue-on-error: true+ with:+ fetch-depth: 0+ filter: blob:none+ persist-credentials: false+ - name: Read the version+ id: version+ continue-on-error: true+ run: |+ echo "version=$(sed -nE "s/^__version__ = ['\"]([^'\"]+)['\"].*/\1/p" apps/python-sdk/firecrawl/__init__.py)" >> "$GITHUB_OUTPUT"+ - uses: ./.github/actions/release-summary+ continue-on-error: true+ timeout-minutes: 3+ with:+ gated-job: Publish to PyPI+ version: firecrawl-py and firecrawl ${{ steps.version.outputs.version }}+ paths: apps/python-sdk+publish:name: Publish to PyPI- needs: build+ needs: [build, release-summary]if: needs.build.outputs.publish == 'true' && github.ref == 'refs/heads/main'runs-on: ubuntu-latestenvironment: release+ concurrency:+ group: ${{ github.workflow }}-release-${{ github.ref }}+ cancel-in-progress: falsepermissions:id-token: writesteps:diff --git a/.github/workflows/publish-ruby-sdk.yml b/.github/workflows/publish-ruby-sdk.ymlindex 97ebd0fa0..b6f5ab145 100644--- a/.github/workflows/publish-ruby-sdk.yml+++ b/.github/workflows/publish-ruby-sdk.yml@@ -11,11 +11,72 @@ on:permissions: {}jobs:+ supersede:+ name: Supersede unapproved runs+ if: github.ref == 'refs/heads/main'+ runs-on: ubuntu-latest+ permissions:+ actions: write+ contents: read+ steps:+ - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5+ continue-on-error: true+ with:+ sparse-checkout: .github/actions+ persist-credentials: false+ - uses: ./.github/actions/supersede-waiting-runs+ continue-on-error: true+ timeout-minutes: 2++ release-summary:+ name: Release summary+ if: github.ref == 'refs/heads/main'+ runs-on: ubuntu-latest+ permissions:+ contents: read+ actions: read+ pull-requests: read+ steps:+ - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5+ continue-on-error: true+ with:+ fetch-depth: 0+ filter: blob:none+ persist-credentials: false+ - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5+ continue-on-error: true+ with:+ python-version: '3.x'+ - name: Install version check dependencies+ continue-on-error: true+ run: |+ python -m pip install --no-cache-dir -r .github/pip-bootstrap.txt+ python -m pip install requests==2.34.2 packaging==26.3+ - name: Read the version+ id: version+ continue-on-error: true+ run: |+ echo "version=$(sed -nE 's/.*VERSION *= *"([^"]+)".*/\1/p' apps/ruby-sdk/lib/firecrawl/version.rb)" >> "$GITHUB_OUTPUT"+ echo "publishes=$(python .github/scripts/check_version_has_incremented.py ruby ./apps/ruby-sdk firecrawl-sdk)" >> "$GITHUB_OUTPUT"+ - uses: ./.github/actions/release-summary+ continue-on-error: true+ timeout-minutes: 3+ with:+ gated-job: Publish to RubyGems+ version: firecrawl-sdk ${{ steps.version.outputs.version }}+ publishes: ${{ steps.version.outputs.publishes }}+ published-step: Publish to RubyGems+ paths: apps/ruby-sdk+publish:name: Publish to RubyGems+ needs: release-summaryif: github.ref == 'refs/heads/main'runs-on: blacksmith-2vcpu-ubuntu-2404environment: release+ concurrency:+ group: ${{ github.workflow }}-release-${{ github.ref }}+ cancel-in-progress: falsepermissions:contents: readsteps:diff --git a/.github/workflows/publish-rust-sdk.yml b/.github/workflows/publish-rust-sdk.ymlindex 08ba4f3b6..ddf0538b3 100644--- a/.github/workflows/publish-rust-sdk.yml+++ b/.github/workflows/publish-rust-sdk.yml@@ -73,12 +73,62 @@ jobs:if-no-files-found: errorretention-days: 7+ supersede:+ name: Supersede unapproved runs+ needs: build+ if: needs.build.outputs.publish == 'true' && github.ref == 'refs/heads/main'+ runs-on: ubuntu-latest+ permissions:+ actions: write+ contents: read+ steps:+ - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5+ continue-on-error: true+ with:+ sparse-checkout: .github/actions+ persist-credentials: false+ - uses: ./.github/actions/supersede-waiting-runs+ continue-on-error: true+ timeout-minutes: 2++ release-summary:+ name: Release summary+ needs: build+ if: needs.build.outputs.publish == 'true' && github.ref == 'refs/heads/main'+ runs-on: ubuntu-latest+ permissions:+ contents: read+ actions: read+ pull-requests: read+ steps:+ - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5+ continue-on-error: true+ with:+ fetch-depth: 0+ filter: blob:none+ persist-credentials: false+ - name: Read the version+ id: version+ continue-on-error: true+ run: |+ echo "version=$(sed -nE 's/^version *= *"([^"]+)".*/\1/p' apps/rust-sdk/Cargo.toml | head -1)" >> "$GITHUB_OUTPUT"+ - uses: ./.github/actions/release-summary+ continue-on-error: true+ timeout-minutes: 3+ with:+ gated-job: Publish to crates.io+ version: firecrawl ${{ steps.version.outputs.version }}+ paths: apps/rust-sdk+publish:name: Publish to crates.io- needs: build+ needs: [build, release-summary]if: needs.build.outputs.publish == 'true' && github.ref == 'refs/heads/main'runs-on: ubuntu-latestenvironment: release+ concurrency:+ group: ${{ github.workflow }}-release-${{ github.ref }}+ cancel-in-progress: falsepermissions:contents: readid-token: write