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 to npm on each commit in master #333

Merged
merged 5 commits into from
Oct 8, 2020
Merged

Conversation

evidolob
Copy link
Collaborator

@evidolob evidolob commented Oct 7, 2020

This PR add GH Action workflow which publish changes in master branch to npm registry with next version tag.

Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
@evidolob evidolob self-assigned this Oct 7, 2020
@coveralls
Copy link

coveralls commented Oct 7, 2020

Coverage Status

Coverage remained the same at 77.923% when pulling 441effb on publish-next-versions into 3742beb on master.

README.md Outdated Show resolved Hide resolved
Co-authored-by: Josh Pinkney <Joshpinkney@gmail.com>
@joshuawilson
Copy link
Member

If you merge this you will have 2 workflow files that will both fire when merge to master is detected. They do not have a dependency so failing the test will not keep it from releasing.
You will either need to find a way to chain them. (after a quick search I do not see how to do that)
OR you will have to put everything in one workflow file and use conditionals there. (not sure this will work either)

@evidolob
Copy link
Collaborator Author

evidolob commented Oct 7, 2020

@joshuawilson nice catch.
We can run tests in CD workflow or I can move everything in to one workflow

@joshuawilson
Copy link
Member

You could have one for on push to master and another for on PR. Both run the tests but only one will release.

@JPinkney
Copy link
Contributor

JPinkney commented Oct 7, 2020

Yeah good catch, I completely forgot about that

@joshuawilson
Copy link
Member

Chaining would be cleaner as it would not duplicate the test and build steps but I can not find a way to do it.

@evidolob
Copy link
Collaborator Author

evidolob commented Oct 7, 2020

OK, I think I know how to do that, I will update PR soon, all steps will be in one workflow

Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
…aml-language-server into publish-next-versions
@@ -50,3 +51,9 @@ jobs:
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Publish
if: ${{ success() && github.event_name == 'push' && github.ref == 'refs/heads/master'}}
Copy link
Member

Choose a reason for hiding this comment

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

How do you ensure that the other workflow runs first?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Which one? We have only one workflow.

Copy link
Member

Choose a reason for hiding this comment

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

Sorry, I thought this was an update to the CD workflow. I missed that are only using one now.
This is a nice solution, good work.

Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
@evidolob evidolob merged commit be3ff1b into master Oct 8, 2020
@evidolob evidolob deleted the publish-next-versions branch October 8, 2020 12:34
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.

4 participants