mirror of https://github.com/astral-sh/uv
Merge 9cbcf53b2f into 0a83bf7dd5
This commit is contained in:
commit
d31b267dfb
|
|
@ -21,6 +21,11 @@ on:
|
||||||
plan:
|
plan:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
secrets:
|
||||||
|
DOCKERHUB_TOKEN_RW:
|
||||||
|
required: false
|
||||||
|
DOCKERHUB_TOKEN_RO:
|
||||||
|
required: false
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
# We want to ensure that the maturin builds still work when we change
|
# We want to ensure that the maturin builds still work when we change
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,11 @@ on:
|
||||||
plan:
|
plan:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
secrets:
|
||||||
|
ASTRAL_DOCS_PAT:
|
||||||
|
required: true
|
||||||
|
MKDOCS_INSIDERS_SSH_KEY:
|
||||||
|
required: false
|
||||||
|
|
||||||
permissions: {}
|
permissions: {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,7 @@
|
||||||
# title/body based on your changelogs.
|
# title/body based on your changelogs.
|
||||||
|
|
||||||
name: Release
|
name: Release
|
||||||
permissions:
|
permissions: {}
|
||||||
"contents": "write"
|
|
||||||
|
|
||||||
# This task will run whenever you workflow_dispatch with a tag that looks like a version
|
# 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.
|
# like "1.0.0", "v0.1.0-prerelease.1", "my-app/0.1.0", "releases/v1.0.0", etc.
|
||||||
|
|
@ -81,10 +80,12 @@ jobs:
|
||||||
# but also really annoying to build CI around when it needs secrets to work right.)
|
# but also really annoying to build CI around when it needs secrets to work right.)
|
||||||
- id: plan
|
- id: plan
|
||||||
run: |
|
run: |
|
||||||
dist ${{ (inputs.tag && inputs.tag != 'dry-run' && format('host --steps=create --tag={0}', inputs.tag)) || 'plan' }} --output-format=json > plan-dist-manifest.json
|
dist ${PLAN_FLAGS} --output-format=json > plan-dist-manifest.json
|
||||||
echo "dist ran successfully"
|
echo "dist ran successfully"
|
||||||
cat plan-dist-manifest.json
|
cat plan-dist-manifest.json
|
||||||
echo "manifest=$(jq -c "." plan-dist-manifest.json)" >> "$GITHUB_OUTPUT"
|
echo "manifest=$(jq -c "." plan-dist-manifest.json)" >> "$GITHUB_OUTPUT"
|
||||||
|
env:
|
||||||
|
PLAN_FLAGS: ${{ (inputs.tag && inputs.tag != 'dry-run' && format('host --steps=create --tag={0}', inputs.tag)) || 'plan' }}
|
||||||
- name: "Upload dist-manifest.json"
|
- name: "Upload dist-manifest.json"
|
||||||
uses: actions/upload-artifact@6027e3dd177782cd8ab9af838c04fd81a07f1d47
|
uses: actions/upload-artifact@6027e3dd177782cd8ab9af838c04fd81a07f1d47
|
||||||
with:
|
with:
|
||||||
|
|
@ -98,7 +99,6 @@ jobs:
|
||||||
uses: ./.github/workflows/build-binaries.yml
|
uses: ./.github/workflows/build-binaries.yml
|
||||||
with:
|
with:
|
||||||
plan: ${{ needs.plan.outputs.val }}
|
plan: ${{ needs.plan.outputs.val }}
|
||||||
secrets: inherit
|
|
||||||
|
|
||||||
custom-build-docker:
|
custom-build-docker:
|
||||||
needs:
|
needs:
|
||||||
|
|
@ -107,7 +107,9 @@ jobs:
|
||||||
uses: ./.github/workflows/build-docker.yml
|
uses: ./.github/workflows/build-docker.yml
|
||||||
with:
|
with:
|
||||||
plan: ${{ needs.plan.outputs.val }}
|
plan: ${{ needs.plan.outputs.val }}
|
||||||
secrets: inherit
|
secrets:
|
||||||
|
DOCKERHUB_TOKEN_RW: ${{ secrets.DOCKERHUB_TOKEN_RW }}
|
||||||
|
DOCKERHUB_TOKEN_RO: ${{ secrets.DOCKERHUB_TOKEN_RO }}
|
||||||
permissions:
|
permissions:
|
||||||
"attestations": "write"
|
"attestations": "write"
|
||||||
"contents": "read"
|
"contents": "read"
|
||||||
|
|
@ -145,7 +147,7 @@ jobs:
|
||||||
- id: cargo-dist
|
- id: cargo-dist
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
dist build ${{ needs.plan.outputs.tag-flag }} --output-format=json "--artifacts=global" > dist-manifest.json
|
dist build "${PLAN_TAG_FLAG}" --output-format=json "--artifacts=global" > dist-manifest.json
|
||||||
echo "dist ran successfully"
|
echo "dist ran successfully"
|
||||||
|
|
||||||
# Parse out what we just built and upload it to scratch storage
|
# Parse out what we just built and upload it to scratch storage
|
||||||
|
|
@ -154,6 +156,8 @@ jobs:
|
||||||
echo "EOF" >> "$GITHUB_OUTPUT"
|
echo "EOF" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
cp dist-manifest.json "$BUILD_MANIFEST_NAME"
|
cp dist-manifest.json "$BUILD_MANIFEST_NAME"
|
||||||
|
env:
|
||||||
|
PLAN_TAG_FLAG: ${{ needs.plan.outputs.tag-flag }}
|
||||||
- name: "Upload artifacts"
|
- name: "Upload artifacts"
|
||||||
uses: actions/upload-artifact@6027e3dd177782cd8ab9af838c04fd81a07f1d47
|
uses: actions/upload-artifact@6027e3dd177782cd8ab9af838c04fd81a07f1d47
|
||||||
with:
|
with:
|
||||||
|
|
@ -197,10 +201,12 @@ jobs:
|
||||||
- id: host
|
- id: host
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
dist host ${{ needs.plan.outputs.tag-flag }} --steps=upload --steps=release --output-format=json > dist-manifest.json
|
dist host "${PLAN_TAG_FLAG}" --steps=upload --steps=release --output-format=json > dist-manifest.json
|
||||||
echo "artifacts uploaded and released successfully"
|
echo "artifacts uploaded and released successfully"
|
||||||
cat dist-manifest.json
|
cat dist-manifest.json
|
||||||
echo "manifest=$(jq -c "." dist-manifest.json)" >> "$GITHUB_OUTPUT"
|
echo "manifest=$(jq -c "." dist-manifest.json)" >> "$GITHUB_OUTPUT"
|
||||||
|
env:
|
||||||
|
PLAN_TAG_FLAG: ${{ needs.plan.outputs.tag-flag }}
|
||||||
- name: "Upload dist-manifest.json"
|
- name: "Upload dist-manifest.json"
|
||||||
uses: actions/upload-artifact@6027e3dd177782cd8ab9af838c04fd81a07f1d47
|
uses: actions/upload-artifact@6027e3dd177782cd8ab9af838c04fd81a07f1d47
|
||||||
with:
|
with:
|
||||||
|
|
@ -216,7 +222,6 @@ jobs:
|
||||||
uses: ./.github/workflows/publish-pypi.yml
|
uses: ./.github/workflows/publish-pypi.yml
|
||||||
with:
|
with:
|
||||||
plan: ${{ needs.plan.outputs.val }}
|
plan: ${{ needs.plan.outputs.val }}
|
||||||
secrets: inherit
|
|
||||||
# publish jobs get escalated permissions
|
# publish jobs get escalated permissions
|
||||||
permissions:
|
permissions:
|
||||||
"id-token": "write"
|
"id-token": "write"
|
||||||
|
|
@ -281,15 +286,16 @@ jobs:
|
||||||
artifacts/*.tar.gz
|
artifacts/*.tar.gz
|
||||||
- name: Create GitHub Release
|
- name: Create GitHub Release
|
||||||
env:
|
env:
|
||||||
PRERELEASE_FLAG: "${{ fromJson(needs.host.outputs.val).announcement_is_prerelease && '--prerelease' || '' }}"
|
PRERELEASE_FLAG: ${{ fromJson(needs.host.outputs.val).announcement_is_prerelease && '--prerelease' || '' }}
|
||||||
ANNOUNCEMENT_TITLE: "${{ fromJson(needs.host.outputs.val).announcement_title }}"
|
ANNOUNCEMENT_TITLE: ${{ fromJson(needs.host.outputs.val).announcement_title }}
|
||||||
ANNOUNCEMENT_BODY: "${{ fromJson(needs.host.outputs.val).announcement_github_body }}"
|
ANNOUNCEMENT_BODY: ${{ fromJson(needs.host.outputs.val).announcement_github_body }}
|
||||||
RELEASE_COMMIT: "${{ github.sha }}"
|
RELEASE_COMMIT: ${{ github.sha }}
|
||||||
|
PLAN_TAG: ${{ needs.plan.outputs.tag }}
|
||||||
run: |
|
run: |
|
||||||
# Write and read notes from a file to avoid quoting breaking things
|
# Write and read notes from a file to avoid quoting breaking things
|
||||||
echo "$ANNOUNCEMENT_BODY" > $RUNNER_TEMP/notes.txt
|
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/*
|
gh release create "${PLAN_TAG}" --target "$RELEASE_COMMIT" $PRERELEASE_FLAG --title "$ANNOUNCEMENT_TITLE" --notes-file "$RUNNER_TEMP/notes.txt" artifacts/*
|
||||||
|
|
||||||
custom-publish-docs:
|
custom-publish-docs:
|
||||||
needs:
|
needs:
|
||||||
|
|
@ -298,4 +304,6 @@ jobs:
|
||||||
uses: ./.github/workflows/publish-docs.yml
|
uses: ./.github/workflows/publish-docs.yml
|
||||||
with:
|
with:
|
||||||
plan: ${{ needs.plan.outputs.val }}
|
plan: ${{ needs.plan.outputs.val }}
|
||||||
secrets: inherit
|
secrets:
|
||||||
|
ASTRAL_DOCS_PAT: ${{ secrets.ASTRAL_DOCS_PAT }}
|
||||||
|
MKDOCS_INSIDERS_SSH_KEY: ${{ secrets.MKDOCS_INSIDERS_SSH_KEY }}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue