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
2 changes: 1 addition & 1 deletion .github/changeset-preview/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"dependencies": {
"@changesets/get-release-plan": "^4.0.16"
"@changesets/get-release-plan": "^5.0.0"
}
}
19 changes: 10 additions & 9 deletions .github/comment-on-release/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,24 +42,25 @@ Add this step to your `.github/workflows/release.yml` file after the `changesets
```yaml
- name: Run Changesets (version or publish)
id: changesets
uses: changesets/action@v1.5.3
uses: changesets/action@ae32849d5ba541f9ae29e40e22a623bc13562f51 # v2.1.2
with:
version: pnpm run changeset:version
publish: pnpm run changeset:publish
commit: 'ci: Version Packages'
title: 'ci: Version Packages'
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
github-token: ${{ secrets.GH_TOKEN }}
version-script: pnpm run changeset:version
publish-script: pnpm run changeset:publish
commit-message: 'ci: Version Packages'
pr-title: 'ci: Version Packages'

- name: Comment on PRs about release
if: steps.changesets.outputs.published == 'true'
uses: TanStack/config/.github/comment-on-release@main
with:
published-packages: ${{ steps.changesets.outputs.publishedPackages }}
published-packages: ${{ steps.changesets.outputs.published-packages }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
```

This action requires the `GH_TOKEN` input to authenticate with the GitHub API.
The release workflow in this example requires a `GH_TOKEN` secret for its custom
GitHub token. The comment action also supports the default `github.token` when its
`GH_TOKEN` input is omitted or empty.

## Requirements

Expand Down
2 changes: 1 addition & 1 deletion .github/comment-on-release/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ runs:
run: node ${{ github.action_path }}/comment-on-release.ts
env:
PUBLISHED_PACKAGES: ${{ inputs.published-packages }}
GH_TOKEN: ${{ inputs.GH_TOKEN }}
GH_TOKEN: ${{ inputs.GH_TOKEN || github.token }}
2 changes: 1 addition & 1 deletion .github/comment-on-release/comment-on-release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ async function commentOnIssue(
async function main() {
// Read published packages from environment variable (set by GitHub Actions)
const publishedPackagesJson = process.env.PUBLISHED_PACKAGES
const repository = process.env.REPOSITORY
const repository = process.env.REPOSITORY || process.env.GITHUB_REPOSITORY

if (!publishedPackagesJson) {
console.log('No packages were published. Skipping PR comments.')
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
contents: write
id-token: write
pull-requests: write
issues: write
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
Expand All @@ -37,15 +38,14 @@ jobs:
id: changesets
uses: changesets/action@ae32849d5ba541f9ae29e40e22a623bc13562f51 # v2.1.2
with:
github-token: ${{ secrets.GH_TOKEN }}
version-script: pnpm run changeset:version
publish-script: pnpm run changeset:publish
commit-message: 'ci: Version Packages'
pr-title: 'ci: Version Packages'
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Comment on PRs and issues about release
if: steps.changesets.outputs.published == 'true'
uses: ./.github/comment-on-release
with:
published-packages: ${{ steps.changesets.outputs.publishedPackages }}
published-packages: ${{ steps.changesets.outputs.published-packages }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ If you have been assigned to fix an issue or develop a new feature, please follo
pnpm install
```

- We use [pnpm](https://pnpm.io/) v9 for package management (run in case of pnpm-related issues).
- We use [pnpm](https://pnpm.io/) v12 for package management (run in case of pnpm-related issues).

```bash
corepack enable && corepack prepare
Expand Down
Loading