mirror of
https://github.com/astral-sh/ruff
synced 2026-01-23 22:40:48 -05:00
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [actions/upload-artifact](https://redirect.github.com/actions/upload-artifact) | action | minor | `v4` -> `v4.6.2` | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>actions/upload-artifact (actions/upload-artifact)</summary> ### [`v4.6.2`](https://redirect.github.com/actions/upload-artifact/releases/tag/v4.6.2) [Compare Source](https://redirect.github.com/actions/upload-artifact/compare/v4.6.1...v4.6.2) #### What's Changed - Update to use artifact 2.3.2 package & prepare for new upload-artifact release by [@​salmanmkc](https://redirect.github.com/salmanmkc) in [https://github.com/actions/upload-artifact/pull/685](https://redirect.github.com/actions/upload-artifact/pull/685) #### New Contributors - [@​salmanmkc](https://redirect.github.com/salmanmkc) made their first contribution in [https://github.com/actions/upload-artifact/pull/685](https://redirect.github.com/actions/upload-artifact/pull/685) **Full Changelog**: https://github.com/actions/upload-artifact/compare/v4...v4.6.2 ### [`v4.6.1`](https://redirect.github.com/actions/upload-artifact/releases/tag/v4.6.1) [Compare Source](https://redirect.github.com/actions/upload-artifact/compare/v4.6.0...v4.6.1) #### What's Changed - Update to use artifact 2.2.2 package by [@​yacaovsnc](https://redirect.github.com/yacaovsnc) in [https://github.com/actions/upload-artifact/pull/673](https://redirect.github.com/actions/upload-artifact/pull/673) **Full Changelog**: https://github.com/actions/upload-artifact/compare/v4...v4.6.1 ### [`v4.6.0`](https://redirect.github.com/actions/upload-artifact/releases/tag/v4.6.0) [Compare Source](https://redirect.github.com/actions/upload-artifact/compare/v4.5.0...v4.6.0) ##### What's Changed - Expose env vars to control concurrency and timeout by [@​yacaovsnc](https://redirect.github.com/yacaovsnc) in [https://github.com/actions/upload-artifact/pull/662](https://redirect.github.com/actions/upload-artifact/pull/662) **Full Changelog**: https://github.com/actions/upload-artifact/compare/v4...v4.6.0 ### [`v4.5.0`](https://redirect.github.com/actions/upload-artifact/releases/tag/v4.5.0) [Compare Source](https://redirect.github.com/actions/upload-artifact/compare/v4.4.3...v4.5.0) ##### What's Changed - fix: deprecated `Node.js` version in action by [@​hamirmahal](https://redirect.github.com/hamirmahal) in [https://github.com/actions/upload-artifact/pull/578](https://redirect.github.com/actions/upload-artifact/pull/578) - Add new `artifact-digest` output by [@​bdehamer](https://redirect.github.com/bdehamer) in [https://github.com/actions/upload-artifact/pull/656](https://redirect.github.com/actions/upload-artifact/pull/656) ##### New Contributors - [@​hamirmahal](https://redirect.github.com/hamirmahal) made their first contribution in [https://github.com/actions/upload-artifact/pull/578](https://redirect.github.com/actions/upload-artifact/pull/578) - [@​bdehamer](https://redirect.github.com/bdehamer) made their first contribution in [https://github.com/actions/upload-artifact/pull/656](https://redirect.github.com/actions/upload-artifact/pull/656) **Full Changelog**: https://github.com/actions/upload-artifact/compare/v4.4.3...v4.5.0 ### [`v4.4.3`](https://redirect.github.com/actions/upload-artifact/releases/tag/v4.4.3) [Compare Source](https://redirect.github.com/actions/upload-artifact/compare/v4.4.2...v4.4.3) #### What's Changed - Undo indirect dependency updates from [#​627](https://redirect.github.com/actions/upload-artifact/issues/627) by [@​joshmgross](https://redirect.github.com/joshmgross) in [https://github.com/actions/upload-artifact/pull/632](https://redirect.github.com/actions/upload-artifact/pull/632) **Full Changelog**: https://github.com/actions/upload-artifact/compare/v4.4.2...v4.4.3 ### [`v4.4.2`](https://redirect.github.com/actions/upload-artifact/releases/tag/v4.4.2) [Compare Source](https://redirect.github.com/actions/upload-artifact/compare/v4.4.1...v4.4.2) #### What's Changed - Bump `@actions/artifact` to 2.1.11 by [@​robherley](https://redirect.github.com/robherley) in [https://github.com/actions/upload-artifact/pull/627](https://redirect.github.com/actions/upload-artifact/pull/627) - Includes fix for relative symlinks not resolving properly **Full Changelog**: https://github.com/actions/upload-artifact/compare/v4.4.1...v4.4.2 ### [`v4.4.1`](https://redirect.github.com/actions/upload-artifact/releases/tag/v4.4.1) [Compare Source](https://redirect.github.com/actions/upload-artifact/compare/v4.4.0...v4.4.1) #### What's Changed - Add a section about hidden files by [@​joshmgross](https://redirect.github.com/joshmgross) in [https://github.com/actions/upload-artifact/pull/607](https://redirect.github.com/actions/upload-artifact/pull/607) - Add workflow file for publishing releases to immutable action package by [@​Jcambass](https://redirect.github.com/Jcambass) in [https://github.com/actions/upload-artifact/pull/621](https://redirect.github.com/actions/upload-artifact/pull/621) - Update [@​actions/artifact](https://redirect.github.com/actions/artifact) to latest version, includes symlink and timeout fixes by [@​robherley](https://redirect.github.com/robherley) in [https://github.com/actions/upload-artifact/pull/625](https://redirect.github.com/actions/upload-artifact/pull/625) #### New Contributors - [@​Jcambass](https://redirect.github.com/Jcambass) made their first contribution in [https://github.com/actions/upload-artifact/pull/621](https://redirect.github.com/actions/upload-artifact/pull/621) **Full Changelog**: https://github.com/actions/upload-artifact/compare/v4.4.0...v4.4.1 ### [`v4.4.0`](https://redirect.github.com/actions/upload-artifact/releases/tag/v4.4.0) [Compare Source](https://redirect.github.com/actions/upload-artifact/compare/v4.3.6...v4.4.0) #### Notice: Breaking Changes ⚠️ We will no longer include hidden files and folders by default in the `upload-artifact` action of this version. This reduces the risk that credentials are accidentally uploaded into artifacts. Customers who need to continue to upload these files can use a new option, `include-hidden-files`, to continue to do so. See ["Notice of upcoming deprecations and breaking changes in GitHub Actions runners"](https://github.blog/changelog/2024-08-19-notice-of-upcoming-deprecations-and-breaking-changes-in-github-actions-runners/) changelog and [this issue](https://redirect.github.com/actions/upload-artifact/issues/602) for more details. #### What's Changed - Exclude hidden files by default by [@​joshmgross](https://redirect.github.com/joshmgross) in [https://github.com/actions/upload-artifact/pull/598](https://redirect.github.com/actions/upload-artifact/pull/598) **Full Changelog**: https://github.com/actions/upload-artifact/compare/v4.3.6...v4.4.0 ### [`v4.3.6`](https://redirect.github.com/actions/upload-artifact/releases/tag/v4.3.6) [Compare Source](https://redirect.github.com/actions/upload-artifact/compare/v4.3.5...v4.3.6) #### What's Changed - Revert to [@​actions/artifact](https://redirect.github.com/actions/artifact) 2.1.8 by [@​robherley](https://redirect.github.com/robherley) in [https://github.com/actions/upload-artifact/pull/594](https://redirect.github.com/actions/upload-artifact/pull/594) **Full Changelog**: https://github.com/actions/upload-artifact/compare/v4...v4.3.6 ### [`v4.3.5`](https://redirect.github.com/actions/upload-artifact/releases/tag/v4.3.5) [Compare Source](https://redirect.github.com/actions/upload-artifact/compare/v4.3.4...v4.3.5) #### What's Changed - Bump [@​actions/artifact](https://redirect.github.com/actions/artifact) to v2.1.9 by [@​robherley](https://redirect.github.com/robherley) in [https://github.com/actions/upload-artifact/pull/588](https://redirect.github.com/actions/upload-artifact/pull/588) - Fixed artifact upload chunk timeout logic [#​1774](https://redirect.github.com/actions/toolkit/pull/1774) - Use lazy stream to prevent issues with open file limits [#​1771](https://redirect.github.com/actions/toolkit/pull/1771) **Full Changelog**: https://github.com/actions/upload-artifact/compare/v4.3.4...v4.3.5 ### [`v4.3.4`](https://redirect.github.com/actions/upload-artifact/releases/tag/v4.3.4) [Compare Source](https://redirect.github.com/actions/upload-artifact/compare/v4.3.3...v4.3.4) #### What's Changed - Update [@​actions/artifact](https://redirect.github.com/actions/artifact) version, bump dependencies by [@​robherley](https://redirect.github.com/robherley) in [https://github.com/actions/upload-artifact/pull/584](https://redirect.github.com/actions/upload-artifact/pull/584) **Full Changelog**: https://github.com/actions/upload-artifact/compare/v4.3.3...v4.3.4 ### [`v4.3.3`](https://redirect.github.com/actions/upload-artifact/releases/tag/v4.3.3) [Compare Source](https://redirect.github.com/actions/upload-artifact/compare/v4.3.2...v4.3.3) #### What's Changed - updating `@actions/artifact` dependency to v2.1.6 by [@​eggyhead](https://redirect.github.com/eggyhead) in [https://github.com/actions/upload-artifact/pull/565](https://redirect.github.com/actions/upload-artifact/pull/565) **Full Changelog**: https://github.com/actions/upload-artifact/compare/v4.3.2...v4.3.3 ### [`v4.3.2`](https://redirect.github.com/actions/upload-artifact/releases/tag/v4.3.2) [Compare Source](https://redirect.github.com/actions/upload-artifact/compare/v4.3.1...v4.3.2) #### What's Changed - Update release-new-action-version.yml by [@​konradpabjan](https://redirect.github.com/konradpabjan) in [https://github.com/actions/upload-artifact/pull/516](https://redirect.github.com/actions/upload-artifact/pull/516) - Minor fix to the migration readme by [@​andrewakim](https://redirect.github.com/andrewakim) in [https://github.com/actions/upload-artifact/pull/523](https://redirect.github.com/actions/upload-artifact/pull/523) - Update readme with v3/v2/v1 deprecation notice by [@​robherley](https://redirect.github.com/robherley) in [https://github.com/actions/upload-artifact/pull/561](https://redirect.github.com/actions/upload-artifact/pull/561) - updating `@actions/artifact` dependency to v2.1.5 and `@actions/core` to v1.0.1 by [@​eggyhead](https://redirect.github.com/eggyhead) in [https://github.com/actions/upload-artifact/pull/562](https://redirect.github.com/actions/upload-artifact/pull/562) #### New Contributors - [@​andrewakim](https://redirect.github.com/andrewakim) made their first contribution in [https://github.com/actions/upload-artifact/pull/523](https://redirect.github.com/actions/upload-artifact/pull/523) **Full Changelog**: https://github.com/actions/upload-artifact/compare/v4.3.1...v4.3.2 ### [`v4.3.1`](https://redirect.github.com/actions/upload-artifact/releases/tag/v4.3.1) [Compare Source](https://redirect.github.com/actions/upload-artifact/compare/v4.3.0...v4.3.1) - Bump [@​actions/artifacts](https://redirect.github.com/actions/artifacts) to latest version to include [updated GHES host check](https://redirect.github.com/actions/toolkit/pull/1648) ### [`v4.3.0`](https://redirect.github.com/actions/upload-artifact/releases/tag/v4.3.0) [Compare Source](https://redirect.github.com/actions/upload-artifact/compare/v4.2.0...v4.3.0) #### What's Changed - Reorganize upload code in prep for merge logic & add more tests by [@​robherley](https://redirect.github.com/robherley) in [https://github.com/actions/upload-artifact/pull/504](https://redirect.github.com/actions/upload-artifact/pull/504) - Add sub-action to merge artifacts by [@​robherley](https://redirect.github.com/robherley) in [https://github.com/actions/upload-artifact/pull/505](https://redirect.github.com/actions/upload-artifact/pull/505) **Full Changelog**: https://github.com/actions/upload-artifact/compare/v4...v4.3.0 ### [`v4.2.0`](https://redirect.github.com/actions/upload-artifact/releases/tag/v4.2.0) [Compare Source](https://redirect.github.com/actions/upload-artifact/compare/v4.1.0...v4.2.0) #### What's Changed - Ability to overwrite an Artifact by [@​robherley](https://redirect.github.com/robherley) in [https://github.com/actions/upload-artifact/pull/501](https://redirect.github.com/actions/upload-artifact/pull/501) **Full Changelog**: https://github.com/actions/upload-artifact/compare/v4...v4.2.0 ### [`v4.1.0`](https://redirect.github.com/actions/upload-artifact/releases/tag/v4.1.0) [Compare Source](https://redirect.github.com/actions/upload-artifact/compare/v4...v4.1.0) #### What's Changed - Add migrations docs by [@​robherley](https://redirect.github.com/robherley) in [https://github.com/actions/upload-artifact/pull/482](https://redirect.github.com/actions/upload-artifact/pull/482) - Update README.md by [@​samuelwine](https://redirect.github.com/samuelwine) in [https://github.com/actions/upload-artifact/pull/492](https://redirect.github.com/actions/upload-artifact/pull/492) - Support artifact-url output by [@​konradpabjan](https://redirect.github.com/konradpabjan) in [https://github.com/actions/upload-artifact/pull/496](https://redirect.github.com/actions/upload-artifact/pull/496) - Update readme to reflect new 500 artifact per job limit by [@​robherley](https://redirect.github.com/robherley) in [https://github.com/actions/upload-artifact/pull/497](https://redirect.github.com/actions/upload-artifact/pull/497) #### New Contributors - [@​samuelwine](https://redirect.github.com/samuelwine) made their first contribution in [https://github.com/actions/upload-artifact/pull/492](https://redirect.github.com/actions/upload-artifact/pull/492) **Full Changelog**: https://github.com/actions/upload-artifact/compare/v4...v4.1.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 4am on Monday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/astral-sh/ruff). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMjcuMyIsInVwZGF0ZWRJblZlciI6IjM5LjIyNy4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJpbnRlcm5hbCJdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
301 lines
12 KiB
YAML
301 lines
12 KiB
YAML
# This file was autogenerated by dist: https://github.com/astral-sh/cargo-dist
|
|
#
|
|
# Copyright 2025 Astral Software Inc.
|
|
# SPDX-License-Identifier: MIT or Apache-2.0
|
|
#
|
|
# CI that:
|
|
#
|
|
# * checks for a Git Tag that looks like a release
|
|
# * builds artifacts with dist (archives, installers, hashes)
|
|
# * uploads those artifacts to temporary workflow zip
|
|
# * on success, uploads the artifacts to a GitHub Release
|
|
#
|
|
# Note that the GitHub Release will be created with a generated
|
|
# title/body based on your changelogs.
|
|
|
|
name: Release
|
|
permissions:
|
|
"contents": "write"
|
|
|
|
# This task will run whenever you workflow_dispatch with a tag that looks like a version
|
|
# like "1.0.0", "v0.1.0-prerelease.1", "my-app/0.1.0", "releases/v1.0.0", etc.
|
|
# Various formats will be parsed into a VERSION and an optional PACKAGE_NAME, where
|
|
# PACKAGE_NAME must be the name of a Cargo package in your workspace, and VERSION
|
|
# must be a Cargo-style SemVer Version (must have at least major.minor.patch).
|
|
#
|
|
# If PACKAGE_NAME is specified, then the announcement will be for that
|
|
# package (erroring out if it doesn't have the given version or isn't dist-able).
|
|
#
|
|
# If PACKAGE_NAME isn't specified, then the announcement will be for all
|
|
# (dist-able) packages in the workspace with that version (this mode is
|
|
# intended for workspaces with only one dist-able package, or with all dist-able
|
|
# packages versioned/released in lockstep).
|
|
#
|
|
# If you push multiple tags at once, separate instances of this workflow will
|
|
# spin up, creating an independent announcement for each one. However, GitHub
|
|
# will hard limit this to 3 tags per commit, as it will assume more tags is a
|
|
# mistake.
|
|
#
|
|
# If there's a prerelease-style suffix to the version, then the release(s)
|
|
# will be marked as a prerelease.
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
tag:
|
|
description: Release Tag
|
|
required: true
|
|
default: dry-run
|
|
type: string
|
|
|
|
jobs:
|
|
# Run 'dist plan' (or host) to determine what tasks we need to do
|
|
plan:
|
|
runs-on: "depot-ubuntu-latest-4"
|
|
outputs:
|
|
val: ${{ steps.plan.outputs.manifest }}
|
|
tag: ${{ (inputs.tag != 'dry-run' && inputs.tag) || '' }}
|
|
tag-flag: ${{ inputs.tag && inputs.tag != 'dry-run' && format('--tag={0}', inputs.tag) || '' }}
|
|
publishing: ${{ inputs.tag && inputs.tag != 'dry-run' }}
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
with:
|
|
submodules: recursive
|
|
- name: Install dist
|
|
# we specify bash to get pipefail; it guards against the `curl` command
|
|
# failing. otherwise `sh` won't catch that `curl` returned non-0
|
|
shell: bash
|
|
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/cargo-dist/releases/download/v0.28.3/cargo-dist-installer.sh | sh"
|
|
- name: Cache dist
|
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
|
with:
|
|
name: cargo-dist-cache
|
|
path: ~/.cargo/bin/dist
|
|
# sure would be cool if github gave us proper conditionals...
|
|
# so here's a doubly-nested ternary-via-truthiness to try to provide the best possible
|
|
# functionality based on whether this is a pull_request, and whether it's from a fork.
|
|
# (PRs run on the *source* but secrets are usually on the *target* -- that's *good*
|
|
# but also really annoying to build CI around when it needs secrets to work right.)
|
|
- id: plan
|
|
run: |
|
|
dist ${{ (inputs.tag && inputs.tag != 'dry-run' && format('host --steps=create --tag={0}', inputs.tag)) || 'plan' }} --output-format=json > plan-dist-manifest.json
|
|
echo "dist ran successfully"
|
|
cat plan-dist-manifest.json
|
|
echo "manifest=$(jq -c "." plan-dist-manifest.json)" >> "$GITHUB_OUTPUT"
|
|
- name: "Upload dist-manifest.json"
|
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
|
with:
|
|
name: artifacts-plan-dist-manifest
|
|
path: plan-dist-manifest.json
|
|
|
|
custom-build-binaries:
|
|
needs:
|
|
- plan
|
|
if: ${{ needs.plan.outputs.publishing == 'true' || fromJson(needs.plan.outputs.val).ci.github.pr_run_mode == 'upload' || inputs.tag == 'dry-run' }}
|
|
uses: ./.github/workflows/build-binaries.yml
|
|
with:
|
|
plan: ${{ needs.plan.outputs.val }}
|
|
secrets: inherit
|
|
|
|
custom-build-docker:
|
|
needs:
|
|
- plan
|
|
if: ${{ needs.plan.outputs.publishing == 'true' || fromJson(needs.plan.outputs.val).ci.github.pr_run_mode == 'upload' || inputs.tag == 'dry-run' }}
|
|
uses: ./.github/workflows/build-docker.yml
|
|
with:
|
|
plan: ${{ needs.plan.outputs.val }}
|
|
secrets: inherit
|
|
permissions:
|
|
"contents": "read"
|
|
"packages": "write"
|
|
|
|
# Build and package all the platform-agnostic(ish) things
|
|
build-global-artifacts:
|
|
needs:
|
|
- plan
|
|
- custom-build-binaries
|
|
- custom-build-docker
|
|
runs-on: "depot-ubuntu-latest-4"
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
BUILD_MANIFEST_NAME: target/distrib/global-dist-manifest.json
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
with:
|
|
submodules: recursive
|
|
- name: Install cached dist
|
|
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
|
|
with:
|
|
name: cargo-dist-cache
|
|
path: ~/.cargo/bin/
|
|
- run: chmod +x ~/.cargo/bin/dist
|
|
# Get all the local artifacts for the global tasks to use (for e.g. checksums)
|
|
- name: Fetch local artifacts
|
|
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
|
|
with:
|
|
pattern: artifacts-*
|
|
path: target/distrib/
|
|
merge-multiple: true
|
|
- id: cargo-dist
|
|
shell: bash
|
|
run: |
|
|
dist build ${{ needs.plan.outputs.tag-flag }} --output-format=json "--artifacts=global" > dist-manifest.json
|
|
echo "dist ran successfully"
|
|
|
|
# Parse out what we just built and upload it to scratch storage
|
|
echo "paths<<EOF" >> "$GITHUB_OUTPUT"
|
|
jq --raw-output ".upload_files[]" dist-manifest.json >> "$GITHUB_OUTPUT"
|
|
echo "EOF" >> "$GITHUB_OUTPUT"
|
|
|
|
cp dist-manifest.json "$BUILD_MANIFEST_NAME"
|
|
- name: "Upload artifacts"
|
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
|
with:
|
|
name: artifacts-build-global
|
|
path: |
|
|
${{ steps.cargo-dist.outputs.paths }}
|
|
${{ env.BUILD_MANIFEST_NAME }}
|
|
# Determines if we should publish/announce
|
|
host:
|
|
needs:
|
|
- plan
|
|
- custom-build-binaries
|
|
- custom-build-docker
|
|
- build-global-artifacts
|
|
# Only run if we're "publishing", and only if local and global didn't fail (skipped is fine)
|
|
if: ${{ always() && needs.plan.outputs.publishing == 'true' && (needs.build-global-artifacts.result == 'skipped' || needs.build-global-artifacts.result == 'success') && (needs.custom-build-binaries.result == 'skipped' || needs.custom-build-binaries.result == 'success') && (needs.custom-build-docker.result == 'skipped' || needs.custom-build-docker.result == 'success') }}
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
runs-on: "depot-ubuntu-latest-4"
|
|
outputs:
|
|
val: ${{ steps.host.outputs.manifest }}
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
with:
|
|
submodules: recursive
|
|
- name: Install cached dist
|
|
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
|
|
with:
|
|
name: cargo-dist-cache
|
|
path: ~/.cargo/bin/
|
|
- run: chmod +x ~/.cargo/bin/dist
|
|
# Fetch artifacts from scratch-storage
|
|
- name: Fetch artifacts
|
|
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
|
|
with:
|
|
pattern: artifacts-*
|
|
path: target/distrib/
|
|
merge-multiple: true
|
|
# This is a harmless no-op for GitHub Releases, hosting for that happens in "announce"
|
|
- id: host
|
|
shell: bash
|
|
run: |
|
|
dist host ${{ needs.plan.outputs.tag-flag }} --steps=upload --steps=release --output-format=json > dist-manifest.json
|
|
echo "artifacts uploaded and released successfully"
|
|
cat dist-manifest.json
|
|
echo "manifest=$(jq -c "." dist-manifest.json)" >> "$GITHUB_OUTPUT"
|
|
- name: "Upload dist-manifest.json"
|
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
|
with:
|
|
# Overwrite the previous copy
|
|
name: artifacts-dist-manifest
|
|
path: dist-manifest.json
|
|
|
|
custom-publish-pypi:
|
|
needs:
|
|
- plan
|
|
- host
|
|
if: ${{ !fromJson(needs.plan.outputs.val).announcement_is_prerelease || fromJson(needs.plan.outputs.val).publish_prereleases }}
|
|
uses: ./.github/workflows/publish-pypi.yml
|
|
with:
|
|
plan: ${{ needs.plan.outputs.val }}
|
|
secrets: inherit
|
|
# publish jobs get escalated permissions
|
|
permissions:
|
|
"id-token": "write"
|
|
"packages": "write"
|
|
|
|
custom-publish-wasm:
|
|
needs:
|
|
- plan
|
|
- host
|
|
if: ${{ !fromJson(needs.plan.outputs.val).announcement_is_prerelease || fromJson(needs.plan.outputs.val).publish_prereleases }}
|
|
uses: ./.github/workflows/publish-wasm.yml
|
|
with:
|
|
plan: ${{ needs.plan.outputs.val }}
|
|
secrets: inherit
|
|
# publish jobs get escalated permissions
|
|
permissions:
|
|
"contents": "read"
|
|
"id-token": "write"
|
|
"packages": "write"
|
|
|
|
# Create a GitHub Release while uploading all files to it
|
|
announce:
|
|
needs:
|
|
- plan
|
|
- host
|
|
- custom-publish-pypi
|
|
- custom-publish-wasm
|
|
# use "always() && ..." to allow us to wait for all publish jobs while
|
|
# still allowing individual publish jobs to skip themselves (for prereleases).
|
|
# "host" however must run to completion, no skipping allowed!
|
|
if: ${{ always() && needs.host.result == 'success' && (needs.custom-publish-pypi.result == 'skipped' || needs.custom-publish-pypi.result == 'success') && (needs.custom-publish-wasm.result == 'skipped' || needs.custom-publish-wasm.result == 'success') }}
|
|
runs-on: "depot-ubuntu-latest-4"
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
with:
|
|
submodules: recursive
|
|
# Create a GitHub Release while uploading all files to it
|
|
- name: "Download GitHub Artifacts"
|
|
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
|
|
with:
|
|
pattern: artifacts-*
|
|
path: artifacts
|
|
merge-multiple: true
|
|
- name: Cleanup
|
|
run: |
|
|
# Remove the granular manifests
|
|
rm -f artifacts/*-dist-manifest.json
|
|
- name: Create GitHub Release
|
|
env:
|
|
PRERELEASE_FLAG: "${{ fromJson(needs.host.outputs.val).announcement_is_prerelease && '--prerelease' || '' }}"
|
|
ANNOUNCEMENT_TITLE: "${{ fromJson(needs.host.outputs.val).announcement_title }}"
|
|
ANNOUNCEMENT_BODY: "${{ fromJson(needs.host.outputs.val).announcement_github_body }}"
|
|
RELEASE_COMMIT: "${{ github.sha }}"
|
|
run: |
|
|
# Write and read notes from a file to avoid quoting breaking things
|
|
echo "$ANNOUNCEMENT_BODY" > $RUNNER_TEMP/notes.txt
|
|
|
|
gh release create "${{ needs.plan.outputs.tag }}" --target "$RELEASE_COMMIT" $PRERELEASE_FLAG --title "$ANNOUNCEMENT_TITLE" --notes-file "$RUNNER_TEMP/notes.txt" artifacts/*
|
|
|
|
custom-notify-dependents:
|
|
needs:
|
|
- plan
|
|
- announce
|
|
uses: ./.github/workflows/notify-dependents.yml
|
|
with:
|
|
plan: ${{ needs.plan.outputs.val }}
|
|
secrets: inherit
|
|
|
|
custom-publish-docs:
|
|
needs:
|
|
- plan
|
|
- announce
|
|
uses: ./.github/workflows/publish-docs.yml
|
|
with:
|
|
plan: ${{ needs.plan.outputs.val }}
|
|
secrets: inherit
|
|
|
|
custom-publish-playground:
|
|
needs:
|
|
- plan
|
|
- announce
|
|
uses: ./.github/workflows/publish-playground.yml
|
|
with:
|
|
plan: ${{ needs.plan.outputs.val }}
|
|
secrets: inherit
|