File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -44,10 +44,30 @@ jobs:
4444 version : npm run version
4545 publish : npm run release
4646 title : " mint-components - Version Packages"
47+ # Suppress changesets/action's built-in GitHub Release creation. We create a scoped tag + release ourselves in the next step.
48+ createGithubReleases : false
4749 env :
4850 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4951 NPM_CONFIG_PROVENANCE : true
5052
53+ - name : Create scoped GitHub Release
54+ if : steps.changesets.outputs.published == 'true'
55+ uses : actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # ed597 = v8
56+ env :
57+ PUBLISHED_PACKAGES : ${{ steps.changesets.outputs.publishedPackages }}
58+ with :
59+ script : |
60+ const [{ name, version }] = JSON.parse(process.env.PUBLISHED_PACKAGES);
61+ const tag = `${name}@${version}`;
62+ await github.rest.repos.createRelease({
63+ ...context.repo,
64+ tag_name: tag,
65+ name: tag,
66+ target_commitish: context.sha,
67+ body: "See packages/mint-components/CHANGELOG.md for details.",
68+ prerelease: version.includes("-"),
69+ });
70+
5171 - name : Build docs site
5272 if : steps.changesets.outputs.published == 'true'
5373 run : NODE_ENV=dev npm run build
You can’t perform that action at this time.
0 commit comments