Bumps the github-actions group with 5 updates in the / directory: | Package | From | To | | --- | --- | --- | | [actions/checkout](https://github.com/actions/checkout) | `7.0.0` | `7.0.1` | | [actions/setup-python](https://github.com/actions/setup-python) | `6.2.0` | `7.0.0` | | [actions/setup-node](https://github.com/actions/setup-node) | `6.4.0` | `7.0.0` | | [github/codeql-action/init](https://github.com/github/codeql-action) | `3.37.6` | `4.37.9` | | [github/codeql-action/analyze](https://github.com/github/codeql-action) | `3.37.6` | `4.37.9` | Updates `actions/checkout` from 7.0.0 to 7.0.1 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0...3d3c42e5aac5ba805825da76410c181273ba90b1) Updates `actions/setup-python` from 6.2.0 to 7.0.0 - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/a309ff8b426b58ec0e2a45f0f869d46889d02405...5fda3b95a4ea91299a34e894583c3862153e4b97) Updates `actions/setup-node` from 6.4.0 to 7.0.0 - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e...820762786026740c76f36085b0efc47a31fe5020) Updates `github/codeql-action/init` from 3.37.6 to 4.37.9 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/c4dd10e44af883a891fe31ced449bcb4a6728b9b...cdf488f595d80d6e07e03d4674febd5ab45fa938) Updates `github/codeql-action/analyze` from 3.37.6 to 4.37.9 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/c4dd10e44af883a891fe31ced449bcb4a6728b9b...cdf488f595d80d6e07e03d4674febd5ab45fa938) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 7.0.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: actions/setup-node dependency-version: 7.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: actions/setup-python dependency-version: 7.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: github/codeql-action/analyze dependency-version: 4.37.5 dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: github/codeql-action/init dependency-version: 4.37.5 dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com>
90 lines
3.5 KiB
YAML
90 lines
3.5 KiB
YAML
name: Release
|
|
|
|
# Single source of truth for cutting a stable release.
|
|
#
|
|
# Push a semver tag (vMAJOR.MINOR.PATCH) at the squash-merge commit on `main`
|
|
# and this workflow, in order:
|
|
# 1. publishes the node to the Comfy Registry, and
|
|
# 2. creates the matching GitHub Release from the CHANGELOG section
|
|
# — only if the publish succeeded.
|
|
#
|
|
# The tag is the only manual step, so the tag, the registry version, and the
|
|
# GitHub Release can no longer drift apart. A failed run is safe to retry: the
|
|
# registry only seals a version on a *successful* publish, so fix the cause
|
|
# (usually the token) and re-run the failed job — no version bump, no
|
|
# double-publish. See docs/maintainers/releasing.md.
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v[0-9]+.[0-9]+.[0-9]+'
|
|
|
|
jobs:
|
|
publish-comfy:
|
|
name: Publish to Comfy registry
|
|
runs-on: ubuntu-latest
|
|
if: ${{ github.repository_owner == 'malkuthro' }}
|
|
permissions:
|
|
contents: read # checkout
|
|
issues: write # publish-node-action opens an issue on failure
|
|
steps:
|
|
- name: Check out the tag
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
submodules: true
|
|
fetch-depth: 0 # full history so the tag-on-main ancestry check resolves
|
|
- name: Verify tag is on main, and matches pyproject + CHANGELOG
|
|
run: |
|
|
set -euo pipefail
|
|
git fetch --no-tags --quiet origin "+refs/heads/main:refs/remotes/origin/main"
|
|
if ! git merge-base --is-ancestor "$GITHUB_SHA" refs/remotes/origin/main; then
|
|
echo "::error::tag ${GITHUB_REF_NAME} (${GITHUB_SHA}) is not on origin/main — refusing to publish an orphan tag"
|
|
exit 1
|
|
fi
|
|
version="${GITHUB_REF_NAME#v}"
|
|
pyproject_version="$(grep -m1 -E '^version' pyproject.toml | sed -E 's/.*"([^"]+)".*/\1/')"
|
|
if [ "$pyproject_version" != "$version" ]; then
|
|
echo "::error::tag ${GITHUB_REF_NAME} does not match pyproject version ${pyproject_version}"
|
|
exit 1
|
|
fi
|
|
if ! grep -qF "## [${version}]" CHANGELOG.md; then
|
|
echo "::error::CHANGELOG.md has no '## [${version}]' section"
|
|
exit 1
|
|
fi
|
|
- name: Publish Custom Node
|
|
uses: Comfy-Org/publish-node-action@0eb6cd742945443bee7f79eeddd4f732780029a1 # v1 branch head
|
|
with:
|
|
personal_access_token: ${{ secrets.REGISTRY_ACCESS_TOKEN }}
|
|
|
|
github-release:
|
|
name: Create GitHub Release
|
|
needs: publish-comfy
|
|
runs-on: ubuntu-latest
|
|
if: ${{ github.repository_owner == 'malkuthro' }}
|
|
permissions:
|
|
contents: write # create the GitHub Release
|
|
steps:
|
|
- name: Check out the tag
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Extract CHANGELOG section
|
|
run: |
|
|
set -euo pipefail
|
|
version="${GITHUB_REF_NAME#v}"
|
|
header="## [${version}]"
|
|
awk -v h="$header" '
|
|
index($0, h) == 1 { f = 1; next }
|
|
f && /^## \[/ { exit }
|
|
f { print }
|
|
' CHANGELOG.md > release-notes.md
|
|
if [ ! -s release-notes.md ]; then
|
|
echo "::error::no release notes extracted for ${version} (missing '## [${version}]' section?)"
|
|
exit 1
|
|
fi
|
|
- name: Create GitHub Release
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
gh release create "${GITHUB_REF_NAME}" \
|
|
--title "${GITHUB_REF_NAME}" \
|
|
--notes-file release-notes.md \
|
|
--verify-tag
|