Skip to content

Independent publishing for npm and github registry #73

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

Merged
merged 3 commits into from
Oct 10, 2022

Conversation

siddharthkp
Copy link
Contributor

@siddharthkp siddharthkp commented Oct 10, 2022

Makes publishing to npm and github registry independent

Unlike before, If the first one fails, it would not stop the second

@siddharthkp siddharthkp requested a review from a team as a code owner October 10, 2022 14:55
cache: npm
- run: npm ci
- run: npm test
- run: npm version ${TAG_NAME} --git-tag-version=false
Copy link
Contributor Author

@siddharthkp siddharthkp Oct 10, 2022

Choose a reason for hiding this comment

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

Task for the future (after verifying this works): I think this can be optimised by combining common steps between the two jobs

- run: npm version ${TAG_NAME} --git-tag-version=false
env:
TAG_NAME: ${{ github.event.release.tag_name }}
- run: npm whoami; npm publish --ignore-scripts --@github:registry='https://npm.pkg.github.com'
Copy link
Contributor

Choose a reason for hiding this comment

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

you probably don't want --ignore-scripts here, now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good catch! removed

@siddharthkp siddharthkp merged commit bb5ec9f into main Oct 10, 2022
@siddharthkp siddharthkp changed the title Independent publishing Independent publishing for npm and github registry Oct 10, 2022
@siddharthkp
Copy link
Contributor Author

siddharthkp commented Oct 10, 2022

Looks like I did the exact opposite of @dgreif set up 11 days ago #70 😅

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.

2 participants