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 Cloudsmith through Github Actions #60

Merged
merged 5 commits into from
Oct 20, 2023
Merged

Conversation

sebastian-alfers
Copy link
Contributor

No description provided.

.github/workflows/publish.yml Show resolved Hide resolved
strategy:
fail-fast: false
matrix: # align with publish-test-reports.yml
SCALA_VERSION: [2.13, 3.3]
Copy link
Member

Choose a reason for hiding this comment

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

no scala here


strategy:
fail-fast: false
matrix: # align with publish-test-reports.yml
Copy link
Member

Choose a reason for hiding this comment

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

publish-test-reports.yml is probably not relevant here

.github/workflows/publish.yml Show resolved Hide resolved
@@ -13,4 +13,20 @@ cargo publish -p akka-projection-rs
cargo publish -p akka-projection-rs-commitlog
cargo publish -p akka-projection-rs-grpc
cargo publish -p akka-projection-rs-storage
```

### Publish to Cloudsmith
Copy link
Member

Choose a reason for hiding this comment

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

note that this will become public source, but I guess it's fine anyway to include these details about Cloudsmith

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I saw we do mention Cloudsmith in akka/akka as well, so I thought its ok.

env:
CARGO_REGISTRIES_AKKA_RS_INDEX: https://dl.cloudsmith.io/${{ secrets.CLOUDSMITH_AKKA_RS_ENTITLEMENT_TOKEN }}/lightbend/akka-rs/cargo/index.git
CARGO_REGISTRIES_AKKA_RS_TOKEN: ${{ secrets.CLOUDSMITH_LIGHTBEND_MACHINE_API_KEY }}

Copy link
Member

Choose a reason for hiding this comment

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

One check we could add is to only publish when there is a tag, fail otherwise. Later we want to automate so that this is run automatically when tagging, but for now we will trigger it manually. Good to have that check so that we are not releasing untagged stuff. The tag can be retrieved as in https://github.com/lightbend/akka-edge-rs/blob/main/.github/workflows/release.yml#L59

Copy link
Contributor Author

@sebastian-alfers sebastian-alfers Oct 19, 2023

Choose a reason for hiding this comment

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

I just added the if check, do you think that is sufficient for now?

@huntc
Copy link
Collaborator

huntc commented Oct 20, 2023

I may well be missing something, but how are you going to bump the versions?

@sebastian-alfers
Copy link
Contributor Author

I may well be missing something, but how are you going to bump the versions?
For now, we commit a new version and then manually run the release. Later this can be improved. Are you ok with that approach for now?

@huntc
Copy link
Collaborator

huntc commented Oct 20, 2023

For now, we commit a new version and then manually run the release. Later this can be improved. Are you ok with that approach for now?

I guess if we're going to automate this then it'd be best to to at least validate that the version numbers correspond to the version number indicated by the tag. Also, perhaps an extra note in the RELEASE.md doc in this regard?


steps:
- name: Checkout
if: startsWith(github.event.ref, 'refs/tags/v')
Copy link
Member

Choose a reason for hiding this comment

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

I don't know how this works, but seems strange that we would be able to check the tag before checkout. We can try and iterate, but I would guess this should be moved to next step.

Copy link
Member

Choose a reason for hiding this comment

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

also, does this abort steps afterwards or just ignores this step?
Maybe best to place it in Publish?

@ennru
Copy link
Member

ennru commented Oct 20, 2023

I suggest we merge this with the release workflow that just covers docs so far.
https://github.com/lightbend/akka-edge-rs/blob/main/.github/workflows/release.yml

@patriknw
Copy link
Member

I suggest we merge this with the release workflow that just covers docs so far.

We can do that when we have automated publishing on tagging, that is the goal.
I'll merge this so we can see if it works.

Copy link
Member

@patriknw patriknw left a comment

Choose a reason for hiding this comment

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

LGTM

@patriknw patriknw merged commit a6752ce into main Oct 20, 2023
1 check passed
@patriknw patriknw deleted the publish-cloudsmith branch October 20, 2023 10:50
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