Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/chart-library-benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
fetch-depth: 0
persist-credentials: false

- run: corepack enable
Expand Down
145 changes: 145 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
name: Publish release

on:
push:
tags:
- 'v*'

permissions:
contents: read

concurrency:
group: charts-release-${{ github.ref }}
cancel-in-progress: false

jobs:
validate:
runs-on: ubuntu-24.04
timeout-minutes: 30
permissions:
contents: read

steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
ref: ${{ github.sha }}
fetch-depth: 0
persist-credentials: false

- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
Comment thread
coderabbitai[bot] marked this conversation as resolved.
with:
node-version: 24.18.0
registry-url: https://registry.npmjs.org
cache: ''

- name: Verify tagged main revision
run: node scripts/verify-release-revision.mjs

- run: corepack enable
- run: pnpm install --frozen-lockfile
- run: pnpm format:check
- run: pnpm docs:check
- run: pnpm typecheck
- run: pnpm test
- run: pnpm release:artifacts
- run: pnpm release:check

- name: Upload checked package artifacts
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: charts-release-${{ github.ref_name }}
path: .release-artifacts
if-no-files-found: error
include-hidden-files: true

publish:
needs: validate
runs-on: ubuntu-24.04
timeout-minutes: 30
permissions:
contents: read
id-token: write

steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
ref: ${{ github.sha }}
fetch-depth: 0
persist-credentials: false

- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 24.18.0
registry-url: https://registry.npmjs.org
cache: ''

- name: Download checked package artifacts
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
name: charts-release-${{ github.ref_name }}
path: .release-artifacts

- name: Revalidate refs and publish with OIDC
run: |
node scripts/verify-release-revision.mjs
node scripts/publish-release.mjs

verify:
needs: publish
runs-on: ubuntu-24.04
timeout-minutes: 30
permissions:
contents: read

steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
ref: ${{ github.sha }}
persist-credentials: false

- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 24.18.0
registry-url: https://registry.npmjs.org
cache: ''

- name: Download checked package artifacts
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
name: charts-release-${{ github.ref_name }}
path: .release-artifacts

- name: Verify installed packages, signatures, and provenance
run: node scripts/verify-published-release.mjs

release:
needs: verify
runs-on: ubuntu-24.04
permissions:
contents: write

steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
ref: ${{ github.sha }}
fetch-depth: 0
persist-credentials: false

- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 24.18.0
cache: ''

- name: Revalidate refs and create GitHub release
env:
GH_TOKEN: ${{ github.token }}
run: |
node scripts/verify-release-revision.mjs
if gh release view "$GITHUB_REF_NAME" --repo "$GITHUB_REPOSITORY" >/dev/null 2>&1; then
exit 0
fi
gh release create "$GITHUB_REF_NAME" \
--repo "$GITHUB_REPOSITORY" \
--verify-tag \
--title "TanStack Charts $GITHUB_REF_NAME" \
--notes-file CHANGELOG.md
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ dist
.bundle-output
.benchmark-output
.catalog-artifact
.release-artifacts
coverage
*.log
tanstack.com-parity/
Expand Down
Loading
Loading