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

CI publish: Add release workflow/job, publish-latest job #270

Merged
merged 3 commits into from
Mar 1, 2024

Conversation

marcdumais-work
Copy link
Contributor

@marcdumais-work marcdumais-work commented Feb 14, 2024

The new release workflow uses action "pipe-cd/actions-gh-release". This action uses file RELEASE in the root. When that file is modified in a PR, and contains a new release tag, it will trigger a release upon the PR being merged. The action will create a git tag in the repo and the corresponding GitHub release, containing auto-generated release notes, that can be later edited by a committer.

The new release will in turn trigger the new "publish-latest" job (ci-cd workflow), which will publish the new version of the package to npm.

Also made misc improvements, e.g. in the package.json, README, ...

Note: it's expected that the "GitHub release" job will fail for now.

To test locally using e.g. verdaccio:

Look at the release procedure added in the root (developer's) README, section "Release/publish". To test using a local registry, it's required to manually create the release tag (GitHub action pipe-cd/actions-gh-release does that in the workflow). I purposefully prevented lerna creating that tag [1] when running yarn version:<release type> to avoid creating a conflicting local tag on a commit that will possibly have a different SHA vs what gets merged, when creating the release PR.

[1] by telling lerna to use a bogus command to create the tag: --git-tag-command /usr/bin/true

@marcdumais-work marcdumais-work force-pushed the ci-publish branch 2 times, most recently from 405996d to 74ea325 Compare February 14, 2024 21:58
lerna.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
@marcdumais-work marcdumais-work marked this pull request as ready for review February 14, 2024 22:05
@marcdumais-work
Copy link
Contributor Author

marcdumais-work commented Feb 14, 2024

I successfully tested locally, publishing to a npm registry, using verdaccio.
I need to re-test following recent update

@marcdumais-work marcdumais-work force-pushed the ci-publish branch 9 times, most recently from 8232bfd to 74ea325 Compare February 15, 2024 18:27
@marcdumais-work marcdumais-work marked this pull request as draft February 29, 2024 18:17
The new release workflow uses action "pipe-cd/actions-gh-release". This
action uses file RELEASE in the root. When that file is modified in a PR,
and contains a new release tag, it will trigger a release upon the PR
being merged. The action will create a git tag in the repo and the
corresponding GitHub release, containing auto-generated release notes,
that can be later edited by a committer.

The new release will in turn trigger the new "publish-latest" job
(ci-cd workflow), which will publish the new version of the package to
npm.

Signed-off-by: Marc Dumais <[email protected]>
@marcdumais-work
Copy link
Contributor Author

I have tested yarn publish:latest:ci locally using verdaccio and it seems to work.

@marcdumais-work marcdumais-work marked this pull request as ready for review March 1, 2024 15:21
@marcdumais-work marcdumais-work changed the title Ci publish: Add release workflow/job, publish-latest job CI publish: Add release workflow/job, publish-latest job Mar 1, 2024
Copy link
Collaborator

@bhufmann bhufmann left a comment

Choose a reason for hiding this comment

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

LGTM for creating releases. Thanks for the contribution.

Copy link
Collaborator

@bhufmann bhufmann left a comment

Choose a reason for hiding this comment

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

small change needed

"ts-jest": "^29.0.0"
},
"homepage": "https://github.com/theia-ide/timeline-chart",
Copy link
Collaborator

Choose a reason for hiding this comment

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

this webpage is not correct. It should be https://github.com/eclipse-cdt-cloud/timeline-chart, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oops - good catch

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

add release instructions in root README
enhance the library's package.json
add README for npm package
massaged,Fixed linter warnings in documentation.md, README

Signed-off-by: Marc Dumais <[email protected]>
Copy link
Collaborator

@bhufmann bhufmann left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution!

@marcdumais-work
Copy link
Contributor Author

Thanks for the review!

@marcdumais-work marcdumais-work merged commit 1374961 into master Mar 1, 2024
4 of 6 checks passed
@marcdumais-work marcdumais-work deleted the ci-publish branch March 1, 2024 16:52
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