Skip to content

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.

3 participants