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

Devops: add GitHub Actions workflow for continuous deployment #776

Merged
merged 1 commit into from Jan 31, 2022

Conversation

sphuber
Copy link
Contributor

@sphuber sphuber commented Jan 28, 2022

Fixes #777

This workflow will be triggered when a new tag is pushed that matches a
semantic versioning pattern. If it is pushed to the main repository of
the aiidateam account, a Python script validate_release_tag.py is
run that will parse the __version__ attribute of the package and
compare it to the version of the tag. If they don't match, the workflow
is aborted.

Otherwise, the pre-commit and the unit test suite is ran, and when
successfull, flit is used to build and publish the package to PyPI.

@sphuber sphuber requested a review from mbercx January 28, 2022 19:00
@sphuber sphuber force-pushed the fix/add-cd-workflow branch 2 times, most recently from e7edf07 to 6972040 Compare January 28, 2022 19:20
Copy link
Member

@mbercx mbercx left a comment

Choose a reason for hiding this comment

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

Thank @sphuber! Had to read up a bit on GitHub actions to do a proper review. Still left some small questions and comments.

.github/workflows/cd.yml Outdated Show resolved Hide resolved
.github/workflows/cd.yml Outdated Show resolved Hide resolved
.github/workflows/cd.yml Outdated Show resolved Hide resolved
.github/workflows/cd.yml Show resolved Hide resolved
This workflow will be triggered when a new tag is pushed that matches a
semantic versioning pattern. If it is pushed to the main repository of
the `aiidateam` account, a Python script `validate_release_tag.py` is
run that will parse the `__version__` attribute of the package and
compare it to the version of the tag. If they don't match, the workflow
is aborted.

Otherwise, the pre-commit and the unit test suite is ran, and when
successfull, `flit` is used to build and publish the package to PyPI.
Copy link
Member

@mbercx mbercx left a comment

Choose a reason for hiding this comment

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

Great, thanks @sphuber! Looks good to me, let's see what happens if we add a new release tag. :)

@sphuber sphuber merged commit 7916231 into develop Jan 31, 2022
@sphuber sphuber deleted the fix/add-cd-workflow branch January 31, 2022 09:45
sphuber added a commit that referenced this pull request Jan 31, 2022
This workflow will be triggered when a new tag is pushed that matches a
semantic versioning pattern. If it is pushed to the main repository of
the `aiidateam` account, a Python script `validate_release_tag.py` is
run that will parse the `__version__` attribute of the package and
compare it to the version of the tag. If they don't match, the workflow
is aborted.

Otherwise, the pre-commit and the unit test suite is ran, and when
successfull, `flit` is used to build and publish the package to PyPI.
sphuber added a commit that referenced this pull request Jan 31, 2022
This workflow will be triggered when a new tag is pushed that matches a
semantic versioning pattern. If it is pushed to the main repository of
the `aiidateam` account, a Python script `validate_release_tag.py` is
run that will parse the `__version__` attribute of the package and
compare it to the version of the tag. If they don't match, the workflow
is aborted.

Otherwise, the pre-commit and the unit test suite is ran, and when
successfull, `flit` is used to build and publish the package to PyPI.
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.

Add GHA workflow to automatically deploy new releases to PyPI
2 participants