Skip to content

Allow private packages to be included in changesets#420

Closed
JakeGinnivan wants to merge 1 commit intochangesets:mainfrom
JakeGinnivan:feature/AllowPrivatePackagesToBePublished
Closed

Allow private packages to be included in changesets#420
JakeGinnivan wants to merge 1 commit intochangesets:mainfrom
JakeGinnivan:feature/AllowPrivatePackagesToBePublished

Conversation

@JakeGinnivan
Copy link
Contributor

This is my solution to #399. I'm currently using this approach in 2 repos and it's working reasonably well right now.

When used in conjunction with the github action this is what happens:

            - id: changesets
              uses: changesets/action@master
              with:
                  title: Deploy to Prod

            - name: Deploy PerthNow Dev
              if: steps.changesets.outputs.published != 'true'
              uses: JakeGinnivan/github-pulumi@master
              with:
                  stack: serverless-mono.perthnow-dev
                  pulumi-cli: yarn pulumi
                  args: up -y --non-interactive
                  github-token: ${{ secrets.GITHUB_TOKEN }}

            - name: Deploy PerthNow Prd
              if: steps.changesets.outputs.published == 'true'
              uses: JakeGinnivan/github-pulumi@master
              with:
                  stack: serverless-mono.perthnow-prd
                  pulumi-cli: yarn pulumi
                  args: up -y --non-interactive
                  github-token: ${{ secrets.GITHUB_TOKEN }}

PRs merge to master, that deploys dev. Then a 'Deploy to prod' PR is opened. It includes NPM packages and also private projects with changelogs.

image

Its a pretty small change which opens up a bunch of cool scenarios

@atlassian-cla-bot
Copy link

atlassian-cla-bot bot commented Aug 1, 2020

Hooray! All contributors have signed the CLA.

@changeset-bot
Copy link

changeset-bot bot commented Aug 1, 2020

💥 No Changeset

Latest commit: 353afc2

Merging this PR will not cause any packages to be released. If these changes should not cause updates to packages in this repo, this is fine 🙂

If these changes should be published to npm, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR


for (let privatePkg of privatePackages) {
const tagName = `${privatePkg.packageJson.name}@${privatePkg.packageJson.version}`;
const isMissingTag = !(await tagExists(tagName));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you change this so these calls happen in parallel?

@gakonst
Copy link

gakonst commented Apr 14, 2021

FYI I've made an attempt at reviving this functionality in #569 @JakeGinnivan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants