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

chore: set up auto for versioning/release management #749

Merged
merged 17 commits into from
Sep 16, 2021

Conversation

hydrosquall
Copy link
Member

@hydrosquall hydrosquall commented Sep 16, 2021

Motivation

  • Less time spent on managing package infra

Changes

Testing

  • CI should pass

Pre-merge checklist for a repo admin

  • Create a branch called next from the current head of master
    • make that the base branch of this PR instead of master
    • make next the base branch for the whole repo
  • Create a branch called stable from the latest tag v6.18.2 https://github.com/vega/vega-embed/tree/stable
  • Make a tagged release of the latest tag (exists, https://github.com/vega/vega-embed/releases/tag/v6.18.2 )
  • Create tags called skip-release and released in this repo (the first is used to tell auto not to release anything if this PR is released, the second is used to tag PRs that have been released).
  • I'll clean up the git history before merging, leaving it intact for now just so we can keep track of the different debugging steps that were taken. (I can also leave it as-is if we just plan to squash everything on merge anyways).

Debugging Notes

  • I was initially getting a cryptic error message about the inability to set the NPM_TOKEN, followed by an authentication error. I tried setting just NPM_TOKEN or NODE_AUTH_TOKEN (which works for all the other repos), but for some reason the command fails unless you use both. Switching back to Node 14 (from the current 15) doesn't seem to make a difference.
  • It turns out when you yarn run, it quietly changes the package registry to yarnpkg instead of npmjs (as reported Running a yarn command with yarn sets registry to https://registry.yarnpkg.com yarnpkg/yarn#5854 ). After trying a few different "workarounds" and gradually increasing logging verbosity, I found the most reliable option was to remove yarn from the release command, and using npm run instead of yarn run for this one task.
📦 Published PR as canary version: 6.18.3--canary.749.7906d39.0

✨ Test out this PR locally via:

npm install [email protected]
# or 
yarn add [email protected]

@hydrosquall hydrosquall self-assigned this Sep 16, 2021
@hydrosquall hydrosquall force-pushed the cameron.yick/add-auto branch 4 times, most recently from ed579fe to 43d69a3 Compare September 16, 2021 01:26
@hydrosquall hydrosquall force-pushed the cameron.yick/add-auto branch 3 times, most recently from 544f854 to 004e482 Compare September 16, 2021 01:59
@hydrosquall hydrosquall force-pushed the cameron.yick/add-auto branch 3 times, most recently from 32d8a70 to 26c50a3 Compare September 16, 2021 02:36
@hydrosquall hydrosquall force-pushed the cameron.yick/add-auto branch 2 times, most recently from 7ab140c to 797f3cf Compare September 16, 2021 02:49
@hydrosquall hydrosquall force-pushed the cameron.yick/add-auto branch 3 times, most recently from e59e96d to 4a4522d Compare September 16, 2021 04:13
@hydrosquall hydrosquall marked this pull request as ready for review September 16, 2021 04:57
- name: Publish to NPM
run: npm publish

# npm config set scripts-prepend-node-path true
Copy link
Member

Choose a reason for hiding this comment

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

What is this?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll remove the comment. What this did was make sure that the version of node being used with npm and the version used when running npm run SCRIPT_NAME would be the same. I thought this might fix the issue (around needing 2 auth variables to be set), but it unfortunately didn't work.

npm/npm#15398

env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need both?

Copy link
Member Author

Choose a reason for hiding this comment

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

I unfortunately don't know why this is different in Node 15 (which seems to be the main difference between this repo and the other 4 vega repos we've set this up for. I tested with just one or the other, and it didn't work in either case.

73e34de

@hydrosquall hydrosquall added the skip-release Preserve the current version when merged label Sep 16, 2021
@hydrosquall hydrosquall merged commit 8d15fe1 into next Sep 16, 2021
@hydrosquall hydrosquall deleted the cameron.yick/add-auto branch September 16, 2021 23:54
@github-actions github-actions bot mentioned this pull request Sep 17, 2021
@github-actions
Copy link

🚀 PR was released in v6.19.0 🚀

@github-actions github-actions bot added released this feature has been released! and removed prerelease labels Sep 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released this feature has been released! skip-release Preserve the current version when merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants