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

Publish package to npm #5

Closed
blcham opened this issue Jun 30, 2020 · 0 comments
Closed

Publish package to npm #5

blcham opened this issue Jun 30, 2020 · 0 comments

Comments

@blcham
Copy link
Collaborator

blcham commented Jun 30, 2020

Moscow method:

  • M - must-have
  • S - should-have
  • C - could-have
  • W - won't-have.

We want to have 2 types of deployments:

  • releases (major, minor, patch)

    • [M] RQ1.1 manual action is required to do the deployment
    • [M] RQ1.2 Automatic commits and should contain new version message
    • The new version should be usable as library (within package.json)
      • [M] RQ1.3.1 concrete release (by specifying version)
      • [M] RQ1.3.2 latest release tag
    • [C] there could be a way to do a release from github directly (attaching a github action to on:release action?)
    • [M] Run tests
  • pre-releases

    • [S] RQ2.1 no manual action is required to do that
    • [M] RQ2.2 no commits should reflect that (or they should not be merged in master any time)
    • should be able to set up in package.json
      • [C] RQ2.3.1.1 RQ concrete pre-release (e.g. indexed by commit id "3.2.1-fecef8d5" or something like "3.2.1-beta.X", but you should be able to find out easily which commit it reflects)
      • [M] RQ2.3.1.2 There should be two different pre-release: alpha for each commit with alpha tag and beta on merge to master with beta tag
      • [M] RQ2.3.2 latest pre-release (e.g. specific tag in npm)
      • [M] Run tests

Solution of RQ1.*:

  • check we are on master
  • check that there is nothing in git stage fail otherwise
  • package.json has "3 scripts":
    • release:major
    • release:minor
    • release:patch
  • on run of release:*
    • update version in package.json
    • update package-lock.json
    • create commit saing bumped version x.y.z
    • push into git
    • release version in npm

Solution for RQ2.*:

  • user pushes commit to master
  • github action picks up commit from master
    • update version in package.json
    • update package-lock.json
    • make release in npm with tag next/beta/alpha

Related links:
Here is example of the workflow: https://www.eliostruyf.com/conditional-publish-packages-npm-github-actions/
Here is example of naming convention: https://node.dev/post/an-open-source-maintainers-guide-to-publishing-npm-packages
Guide to set up npm tokens: https://hackernoon.com/publish-npm-packages-using-github-actions-a-how-to-guide-q31c34fg
Semantic versioning -- https://docs.npmjs.com/about-semantic-versioning

@blcham blcham changed the title create npm package Publish package to npm Jul 1, 2020
@blcham blcham added this to To do in SForms Board Aug 5, 2021
@LaChope LaChope moved this from To do to In progress in SForms Board Mar 22, 2022
@LaChope LaChope mentioned this issue Mar 29, 2022
LaChope added a commit that referenced this issue Apr 7, 2022
LaChope added a commit that referenced this issue Apr 7, 2022
LaChope added a commit that referenced this issue Apr 7, 2022
LaChope added a commit that referenced this issue Apr 7, 2022
LaChope added a commit that referenced this issue Apr 7, 2022
LaChope added a commit that referenced this issue Apr 7, 2022
LaChope added a commit that referenced this issue Apr 7, 2022
LaChope added a commit that referenced this issue Apr 7, 2022
LaChope added a commit that referenced this issue Apr 7, 2022
LaChope added a commit that referenced this issue Apr 7, 2022
LaChope added a commit that referenced this issue Apr 7, 2022
LaChope added a commit that referenced this issue Apr 7, 2022
LaChope added a commit that referenced this issue Apr 7, 2022
LaChope added a commit that referenced this issue Apr 7, 2022
LaChope added a commit that referenced this issue Apr 7, 2022
LaChope added a commit that referenced this issue Apr 7, 2022
LaChope added a commit that referenced this issue Apr 7, 2022
LaChope added a commit that referenced this issue Apr 7, 2022
LaChope added a commit that referenced this issue Apr 7, 2022
LaChope added a commit that referenced this issue Apr 7, 2022
LaChope added a commit that referenced this issue Apr 7, 2022
LaChope added a commit that referenced this issue Apr 7, 2022
LaChope added a commit that referenced this issue Apr 7, 2022
LaChope added a commit that referenced this issue Apr 7, 2022
LaChope added a commit that referenced this issue Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

2 participants