Skip to content

Commit

Permalink
ci: run list-pkgs when changeset version
Browse files Browse the repository at this point in the history
  • Loading branch information
uiolee committed Oct 7, 2024
1 parent 9ff0248 commit 31bf409
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 10 deletions.
19 changes: 10 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ jobs:
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: "pnpm run publish-packages"
version: "pnpm run version-packages"
commit: "release: Version Packages"
title: "release: Version Packages"
setupGitUser: true
Expand All @@ -59,21 +60,21 @@ jobs:

- name: Generate SUMMARY
env:
hasChangesets: ${{steps.changesets_action.outputs.hasChangesets}}
pullRequestNumber: ${{steps.changesets_action.outputs.pullRequestNumber}}
published: ${{steps.changesets_action.outputs.published}}
publishedPackages: ${{steps.changesets_action.outputs.publishedPackages}}
hasChangesets: ${{ steps.changesets_action.outputs.hasChangesets }}
pullRequestNumber: ${{ steps.changesets_action.outputs.pullRequestNumber }}
published: ${{ steps.changesets_action.outputs.published }}
publishedPackages: ${{ steps.changesets_action.outputs.publishedPackages }}
run: |
echo "## changesets/action" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "|name|value|" >> $GITHUB_STEP_SUMMARY
echo "|---|---|" >> $GITHUB_STEP_SUMMARY
echo "|hasChangesets|${{env.hasChangesets}}|" >> $GITHUB_STEP_SUMMARY
echo "|pullRequestNumber|${{github.repository}}#${{env.pullRequestNumber}}|" >> $GITHUB_STEP_SUMMARY
echo "|published|${{env.published}}|" >> $GITHUB_STEP_SUMMARY
echo "|hasChangesets|${{ env.hasChangesets }}|" >> $GITHUB_STEP_SUMMARY
echo "|pullRequestNumber|${{ github.repository }}#${{ env.pullRequestNumber }}|" >> $GITHUB_STEP_SUMMARY
echo "|published|${{ env.published }}|" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "### published packages:" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "${{env.publishedPackages.*.name}}" >> $GITHUB_STEP_SUMMARY
echo "${{env.publishedPackages.*.version}}" >> $GITHUB_STEP_SUMMARY
echo "${{ join(env.publishedPackages.*.name, ' | ') }}" >> $GITHUB_STEP_SUMMARY
echo "${{ join(env.publishedPackages.*.version, ' | ') }}" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@
"dev": "turbo dev",
"format": "prettier --write \"**/*.{md}\"",
"lint": "turbo lint",
"list-packages": "node ./scripts/list.mjs",
"prepack": "echo \"don't run pack/publish in root!\" && exit 1",
"prepare": "turbo run build -F eslint-config",
"publish-packages": "turbo run build && changeset publish",
"sort": "pnpm -r exec sort-package-json && sort-package-json",
"test": "turbo test",
"test:lcov": "turbo test:lcov"
"test:lcov": "turbo test:lcov",
"version-packages": "changeset version && pnpm run list-packages"
},
"devDependencies": {
"@changesets/cli": "^2.27.8",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 31bf409

Please # to comment.