Skip to content

docs(changelog): record the dependency refresh in the four pending re… #78

docs(changelog): record the dependency refresh in the four pending re…

docs(changelog): record the dependency refresh in the four pending re… #78

Workflow file for this run

name: dagster-release
# Publishes dagster-rocky to PyPI via OIDC and ensures a GitHub Release exists
# when a dagster-v* tag is pushed. Supports both workflows:
# 1. CI-only: push tag → this workflow creates the GH Release + publishes to PyPI
# 2. Local-first: scripts/release.sh creates the GH Release, push tag → CI publishes to PyPI
# The ensure-release job is idempotent — it skips if the release already exists.
on:
push:
tags: ["dagster-v*"]
permissions:
contents: write
defaults:
run:
working-directory: integrations/dagster
jobs:
# Create the GitHub Release if it doesn't already exist (supports both
# CI-only releases and the local scripts/release.sh workflow where the
# release is created before the tag push).
ensure-release:
name: Ensure GitHub Release exists
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Create release if missing
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TAG="${GITHUB_REF_NAME}"
if gh release view "$TAG" --repo "$GITHUB_REPOSITORY" >/dev/null 2>&1; then
echo "Release $TAG already exists (created by scripts/release.sh)"
else
echo "Creating release $TAG"
gh release create "$TAG" \
--repo "$GITHUB_REPOSITORY" \
--generate-notes \
--latest=false \
--title "$TAG"
fi
publish-pypi:
name: Publish to PyPI
needs: ensure-release
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
- run: uv build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@ba38be9e461d3875417946c167d0b5f3d385a247 # release/v1
with:
packages-dir: integrations/dagster/dist/
- name: Attach wheel and sdist to GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Guard the glob so an empty dist/ (uv build silently produced no
# artifacts) doesn't send the literal string `dist/*` to the
# upload command.
shopt -s nullglob
artifacts=( dist/* )
shopt -u nullglob
if (( ${#artifacts[@]} == 0 )); then
echo "ERROR: no artifacts found under dist/" >&2
ls -la dist/ || true
exit 1
fi
gh release upload "${GITHUB_REF_NAME}" "${artifacts[@]}" \
--repo "$GITHUB_REPOSITORY" \
--clobber