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

chore(release): add support to release dev packages #493

Merged

Conversation

shubham1172
Copy link
Member

@shubham1172 shubham1172 commented May 26, 2023

Description

This PR refactors the build pipelines and adds a job to release dev packages (on push to main).

  1. Removes unused script ./scripts/publish.sh
  2. Adds a new command to package.json build-ci to build typescript package without linting or prettifying
  3. Adds new steps to github actions to publish dev package to NPM
  4. Split the github actions into three jobs - build, publish, and publish-dev.

Issue reference

Please reference the issue this PR will close: #492

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation

@codecov
Copy link

codecov bot commented May 26, 2023

Codecov Report

Merging #493 (4440fdf) into main (b4335c1) will decrease coverage by 2.02%.
The diff coverage is 3.03%.

❗ Current head 4440fdf differs from pull request most recent head 861fd8f. Consider uploading reports for the commit 861fd8f to get more accurate results

@@            Coverage Diff             @@
##             main     #493      +/-   ##
==========================================
- Coverage   38.74%   36.72%   -2.02%     
==========================================
  Files          82       82              
  Lines        8187     9927    +1740     
  Branches      371      371              
==========================================
+ Hits         3172     3646     +474     
- Misses       4956     6222    +1266     
  Partials       59       59              
Impacted Files Coverage Δ
src/implementation/Client/GRPCClient/lock.ts 16.00% <ø> (ø)
src/proto/dapr/proto/common/v1/common_pb.js 30.97% <0.00%> (ø)
src/proto/dapr/proto/runtime/v1/dapr_pb.js 31.43% <ø> (-1.21%) ⬇️
src/proto/dapr/proto/runtime/v1/dapr_grpc_pb.js 5.82% <1.05%> (-1.91%) ⬇️
src/implementation/Client/DaprClient.ts 83.52% <100.00%> (ø)

Signed-off-by: Shubham Sharma <[email protected]>
@shubham1172 shubham1172 changed the title [WIP] Add support to release dev packages Add support to release dev packages May 26, 2023
@shubham1172 shubham1172 marked this pull request as ready for review May 26, 2023 06:19
@shubham1172 shubham1172 requested review from a team as code owners May 26, 2023 06:19
Signed-off-by: Shubham Sharma <[email protected]>
.github/workflows/build.yml Show resolved Hide resolved
.github/workflows/build.yml Outdated Show resolved Hide resolved
.github/workflows/build.yml Outdated Show resolved Hide resolved
scripts/build.sh Show resolved Hide resolved
.github/workflows/build.yml Show resolved Hide resolved
Signed-off-by: Shubham Sharma <[email protected]>
Signed-off-by: Shubham Sharma <[email protected]>
DeepanshuA
DeepanshuA previously approved these changes May 26, 2023
XavierGeerinck
XavierGeerinck previously approved these changes May 26, 2023
Copy link
Contributor

@XavierGeerinck XavierGeerinck left a comment

Choose a reason for hiding this comment

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

Ok for me! Question: don't we want to use the commit sha hash instead of a timestamp?

@shubham1172
Copy link
Member Author

Ok for me! Question: don't we want to use the commit sha hash instead of a timestamp?

Good idea, I think SHA will be helpful when users want to associate dev release with a commit - I had kept timestamps only for one reason, easy to find the latest version and based on time. Let me add a go style versioning in that case.

e.g. 3.0.1-20230526200301-0744d001aa84

WDYT @XavierGeerinck?

@XavierGeerinck
Copy link
Contributor

I would personally just do the sha hash :)

Signed-off-by: Shubham Sharma <[email protected]>
@shubham1172 shubham1172 dismissed stale reviews from XavierGeerinck and DeepanshuA via 861fd8f May 26, 2023 14:36
@shubham1172
Copy link
Member Author

Since short hashes can have collisions, we should either use

  1. timestamp + short hash
  2. long hash

@XavierGeerinck
Copy link
Contributor

Since short hashes can have collisions, we should either use

  1. timestamp + short hash
  2. long hash

Good point, ok then we can use your proposal

@shubham1172 shubham1172 force-pushed the shubham1172/add-dev-package-pipeline branch from 4440fdf to 861fd8f Compare May 26, 2023 14:56
@XavierGeerinck XavierGeerinck enabled auto-merge May 26, 2023 15:09
@XavierGeerinck XavierGeerinck added this pull request to the merge queue May 26, 2023
Merged via the queue into dapr:main with commit e455e01 May 26, 2023
jriffs pushed a commit to jriffs/js-sdk that referenced this pull request Jun 7, 2023
* Refactor current build and publish steps

Signed-off-by: Shubham Sharma <[email protected]>

* Move npm install to correct place

Signed-off-by: Shubham Sharma <[email protected]>

* Add dev publish steps

Signed-off-by: Shubham Sharma <[email protected]>

* Add package details to README

Signed-off-by: Shubham Sharma <[email protected]>

* Shared node_ver env;

Signed-off-by: Shubham Sharma <[email protected]>

* Revert matrix

Signed-off-by: Shubham Sharma <[email protected]>

* Use commit hash in version

Signed-off-by: Shubham Sharma <[email protected]>

---------

Signed-off-by: Shubham Sharma <[email protected]>
Signed-off-by: jriffs <[email protected]>
@shubham1172 shubham1172 changed the title Add support to release dev packages chore(release): add support to release dev packages Jun 8, 2023
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.

Create a dev release for SDK
3 participants