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

Add GH Actions worflow for continuous deployment #204

Merged
merged 3 commits into from
Apr 5, 2022
Merged

Add GH Actions worflow for continuous deployment #204

merged 3 commits into from
Apr 5, 2022

Conversation

NeelayS
Copy link
Collaborator

@NeelayS NeelayS commented Apr 3, 2022

This worflow will publish the package to PyPI every time a release is created on GitHub.

@NeelayS NeelayS linked an issue Apr 3, 2022 that may be closed by this pull request
@NeelayS NeelayS requested a review from prajnan93 April 3, 2022 20:15
name: Publish to PyPI

on:
release:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this triggered when we tag a commit for release?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, this is triggered when we create a release on GitHub. I thought this would be good to do since we can also add release notes along with a tag when creating a release on GitHub.

- name: Build package
run: python -m build

- name: Publish package to PyPI
Copy link
Collaborator

@prajnan93 prajnan93 Apr 4, 2022

Choose a reason for hiding this comment

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

  1. How can we provide the package version number? Is it auto-upgraded?
  2. Will this deploy for all commits made to the Main branch or only for tagged commits?

The ideal strategy would be to upload a package only for tagged commits so that we can group multiple features into one release. Let me know your thoughts.

Another nice to have step would be to notify the release in our slack group ezflow using webhooks but it's not a high priority task. We can look into it later.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

For now, we'll have to manually update the version number in the last commit before creating a release on GitHub. However, I think it's possible to extend this workflow such that it takes the version number specified in the GitHub release tag and updates it for the package. I've opened a separate issue for this (#205).

@prajnan93 prajnan93 merged commit ec6a2d7 into main Apr 5, 2022
@NeelayS NeelayS deleted the cd branch April 5, 2022 04:30
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.

Set up Continuous Deployment
2 participants