Skip to content

chore: Automate release process - #8177

Open
camdecoster wants to merge 8 commits into
mainfrom
cam/8136/automate-release-process
Open

camdecoster wants to merge 8 commits into
mainfrom
cam/8136/automate-release-process

Conversation

@camdecoster

@camdecoster camdecoster commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Description

Add workflows to automate the release process and update docs accordingly. See the image below for the flow.

Closes #8136.

Changes

  • Add workflows
  • Update check draftlog workflow
  • Fix formatting errors in changelog
  • Delete obsolete config files

Testing

We'll only be able to fully test this after merge as the workflows run on workflow dispatch.

Notes

  • The following one time set up needs to happen:
    • Create/use a GH app with contents and PR read/write permissions
    • Add trusted publishing in npm
    • Add an env in this repo
    • Create credentials for the CDN upload

Flow diagram

image

@camdecoster camdecoster added the no-draftlog The associated PR doesn't require a draftlog and the CI check will be skipped. label Nov 20, 2026
fi

MISSING_LINK=""
LEADING_SPACE=""

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: the name confused me since there's no space in LEADING_SPACE :) Should we call this something like BAD_INDENT_FILES?

Comment on lines +69 to +70
contents: write
id-token: write

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than blanket write permissions for every command in this job, what about replacing the git push with a targeted

 git push "https://x-access-token:${GH_TOKEN}@github.com/${{ github.repository }}.git" "v$VERSION"

My thinking: the permissions granted here will also apply to the npm ci step (which runs arbitrary scripts from various dependencies - we trust there's no malicious ones but we can't know). And an automated process will invite less review and less awareness of any funky behaviour during a release, so we should keep the write permissions narrow.

Comment on lines +69 to +85
- name: Audit the dependencies
id: audit
env:
SKIP_AUDIT: ${{ inputs.skip-audit }}
run: |
set -uo pipefail
if npm audit > "$RUNNER_TEMP/audit.txt"; then
cat "$RUNNER_TEMP/audit.txt"
exit 0
fi
cat "$RUNNER_TEMP/audit.txt"
if [ "$SKIP_AUDIT" != "true" ]; then
echo "::error::npm audit reported vulnerabilities. Fix them on main, or run this workflow again with skip-audit."
exit 1
fi
echo "::warning::npm audit reported vulnerabilities. The release continues because skip-audit is set."
echo "skipped=true" >> "$GITHUB_OUTPUT"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about using npm audit --omit=dev?
That way we'd only check what users actually install, and not block ourselves for dev dependency issues.

Comment thread package.json
"name": "plotly.js",
"version": "4.3.0",
"description": "The open source javascript graphing library that powers plotly",
"description": "The open source JavaScript graphing library that powers plotly.py and Plotly Dash",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: to me, the sentence plays down that this is a standalone library in its own right. Also applies to bower.json, composer.json.

Suggested change
"description": "The open source JavaScript graphing library that powers plotly.py and Plotly Dash",
"description": "The open source JavaScript graphing library that also powers plotly.py and Plotly Dash",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-draftlog The associated PR doesn't require a draftlog and the CI check will be skipped.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CHORE]: Automate release process

2 participants