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

feat: setup canary releases using changesets #3466

Closed
wants to merge 2 commits into from
Closed

Conversation

saihaj
Copy link
Member

@saihaj saihaj commented Jan 27, 2022

Need to setup GitHub secret for NPM token NODE_AUTH_TOKEN and Bot token to comment GH_API_TOKEN

closes #3383

```
${{ steps.canary.outputs.changesetsPublishedPackages}}
```
bot-token: ${{ secrets.GH_API_TOKEN }}
Copy link
Member

Choose a reason for hiding this comment

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

you can use ${{ secrets.GITHUB_TOKEN }} here, check the setup in graphiql repo

${{ steps.canary.outputs.changesetsPublishedPackages}}
```
bot-token: ${{ secrets.GH_API_TOKEN }}
bot: 'theguild-bot'
Copy link
Member

Choose a reason for hiding this comment

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

i think you can use github-actions

@@ -0,0 +1,64 @@
name: Canary Release
Copy link
Member

Choose a reason for hiding this comment

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

I guess we need the 2nd workflow for release? this way we can release using changeset as well. What do you think @IvanGoncharov ?
(Changesets collects all changeset files and keep an updated Release PR, so when it's merged, you get the actual version bump and NPM release)

Copy link
Member

Choose a reason for hiding this comment

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

We discuss canary release so let's address that and see how it goes.

@@ -0,0 +1,99 @@
/* eslint-disable */
Copy link
Member

Choose a reason for hiding this comment

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

This is optional, we are using that to do custom pre-release and not use the default way of doing that with changesets...


- name: Publish a message
if: steps.canary.outputs.released
uses: 'kamilkisiela/pr-comment@master'
Copy link
Member

Choose a reason for hiding this comment

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

This custom guild stuff, right?
I think idea was that we use some popular tool for doing canary releases?
Those look like there are guild internal scripts?
I'm ok with automation but it should be something popular and widespread.

Choose a reason for hiding this comment

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

I can make it facebook/pr-comment, does it change anything?

Copy link

@kamilkisiela kamilkisiela Jan 27, 2022

Choose a reason for hiding this comment

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

run: npm ci --ignore-scripts

- name: Setup NPM credentials
run: echo "//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN" >> ~/.npmrc
Copy link
Member

Choose a reason for hiding this comment

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

I'm not ok with putting NPM token on FS, it means all subsequent scripts have access to it.
Also, I'm not ok passing NPM token to anything that is not official NPM or GitHub tool/lib/etc.

IvanGoncharov added a commit to IvanGoncharov/graphql-js that referenced this pull request Feb 1, 2022
IvanGoncharov added a commit to IvanGoncharov/graphql-js that referenced this pull request Feb 1, 2022
IvanGoncharov added a commit to IvanGoncharov/graphql-js that referenced this pull request Feb 1, 2022
IvanGoncharov added a commit to IvanGoncharov/graphql-js that referenced this pull request Feb 1, 2022
IvanGoncharov added a commit to IvanGoncharov/graphql-js that referenced this pull request Feb 1, 2022
IvanGoncharov added a commit that referenced this pull request Feb 2, 2022
IvanGoncharov added a commit that referenced this pull request Feb 2, 2022
@saihaj saihaj closed this Feb 3, 2022
@saihaj saihaj deleted the setup-canary branch February 3, 2022 04:40
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.

Canary releases
4 participants