-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
ci: introduce changesets #9502
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: introduce changesets #9502
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json", | ||
"changelog": [ | ||
"@svitejs/changesets-changelog-github-compact", | ||
{ "repo": "TanStack/query" } | ||
], | ||
"commit": false, | ||
"access": "public", | ||
"baseBranch": "main", | ||
"updateInternalDependencies": "patch", | ||
"fixed": [], | ||
"linked": [] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
## 🎯 Changes | ||
|
||
<!-- What changes are made in this PR? Describe the change and its motivation. --> | ||
|
||
## ✅ Checklist | ||
|
||
- [ ] I have followed the steps in the [Contributing guide](https://github.com/TanStack/query/blob/main/CONTRIBUTING.md). | ||
- [ ] I have tested this code locally with `pnpm test:pr`. | ||
|
||
## 🚀 Release Impact | ||
|
||
- [ ] This change affects published code, and I have generated a [changeset](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md). | ||
- [ ] This change is docs/CI/dev-only (no release). |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,11 +1,6 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||
name: ci | ||||||||||||||||||||||||||||||||||||||||||||||||||
name: Release | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
on: | ||||||||||||||||||||||||||||||||||||||||||||||||||
workflow_dispatch: | ||||||||||||||||||||||||||||||||||||||||||||||||||
inputs: | ||||||||||||||||||||||||||||||||||||||||||||||||||
tag: | ||||||||||||||||||||||||||||||||||||||||||||||||||
description: override release tag | ||||||||||||||||||||||||||||||||||||||||||||||||||
required: false | ||||||||||||||||||||||||||||||||||||||||||||||||||
push: | ||||||||||||||||||||||||||||||||||||||||||||||||||
branches: [main, alpha, beta, rc, v4] | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -39,16 +34,20 @@ jobs: | |||||||||||||||||||||||||||||||||||||||||||||||||
- name: Stop Nx Agents | ||||||||||||||||||||||||||||||||||||||||||||||||||
if: ${{ always() }} | ||||||||||||||||||||||||||||||||||||||||||||||||||
run: npx nx-cloud stop-all-agents | ||||||||||||||||||||||||||||||||||||||||||||||||||
- name: Publish | ||||||||||||||||||||||||||||||||||||||||||||||||||
- name: Version Packages | ||||||||||||||||||||||||||||||||||||||||||||||||||
run: pnpm run changeset:version | ||||||||||||||||||||||||||||||||||||||||||||||||||
- name: Commit version files | ||||||||||||||||||||||||||||||||||||||||||||||||||
run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||
git config --global user.name 'Tanner Linsley' | ||||||||||||||||||||||||||||||||||||||||||||||||||
git config --global user.email 'tannerlinsley@users.noreply.github.com' | ||||||||||||||||||||||||||||||||||||||||||||||||||
npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}" | ||||||||||||||||||||||||||||||||||||||||||||||||||
pnpm run cipublish | ||||||||||||||||||||||||||||||||||||||||||||||||||
git config --global user.email 'tannerlinsley@users.noreply.github.com' git add -A | ||||||||||||||||||||||||||||||||||||||||||||||||||
git commit -m "ci: Version Packages" | ||||||||||||||||||||||||||||||||||||||||||||||||||
git push | ||||||||||||||||||||||||||||||||||||||||||||||||||
env: | ||||||||||||||||||||||||||||||||||||||||||||||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+39
to
+46
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix git configuration and add conditional logic for version commits The current implementation has several issues:
- name: Commit version files
run: |
git config --global user.name 'Tanner Linsley'
- git config --global user.email 'tannerlinsley@users.noreply.github.com' git add -A
- git commit -m "ci: Version Packages"
- git push
+ git config --global user.email 'tannerlinsley@users.noreply.github.com'
+ git add -A
+ if git diff --staged --quiet; then
+ echo "No version changes to commit"
+ else
+ git commit -m "ci: Version Packages"
+ git push
+ fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||||||||||||||||||||||||||||||||||||||||||||||
- name: Publish Packages | ||||||||||||||||||||||||||||||||||||||||||||||||||
run: pnpm run changeset:publish | ||||||||||||||||||||||||||||||||||||||||||||||||||
env: | ||||||||||||||||||||||||||||||||||||||||||||||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||||||||||||||||||||||||||||||||||||||||||||||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||||||||||||||||||||||||||||||||||||||||||||||||||
TAG: ${{ inputs.tag }} | ||||||||||||||||||||||||||||||||||||||||||||||||||
- name: Upload coverage to Codecov | ||||||||||||||||||||||||||||||||||||||||||||||||||
uses: codecov/codecov-action@v4.6.0 | ||||||||||||||||||||||||||||||||||||||||||||||||||
with: | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Uh oh!
There was an error while loading. Please reload this page.