Skip to content
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

Allow private packages to be included in changesets #420

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

let promises: Promise<{
name: string;
newVersion: string;
published: boolean;
}>[] = [];

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.

None yet

3 participants