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

Automated release process and auto update copyright year #3937

Merged
merged 6 commits into from
Dec 21, 2020

Conversation

MetRonnie
Copy link
Member

@MetRonnie MetRonnie commented Nov 11, 2020

This is a small change with no associated Issue.

Needs:

  • PyPI token added to repo

Requirements check-list

  • I have read CONTRIBUTING.md and added my name as a Code Contributor.
  • Contains logically grouped changes (else tidy your branch by rebase).
  • Does not contain off-topic changes (use other PRs for other changes).
  • Does not need tests.
  • No change log entry required (invisible to users).
  • I have opened a documentation PR at Update release instructions with new automated process cylc-admin#103
  • No dependency changes.

@MetRonnie MetRonnie added this to the cylc-8.0a3 milestone Nov 11, 2020
@MetRonnie MetRonnie self-assigned this Nov 11, 2020
@MetRonnie

This comment has been minimized.

@hjoliver
Copy link
Member

Sounds great 👍 But can you explain how it works, to save me from a bit of time-consuming reverse-engineering? (e.g. what triggers the new release action?)

@MetRonnie
Copy link
Member Author

Essentially:

  1. Someone triggers the stage 1 workflow manually - this creates a PR with the new version number etc.
  2. After reviewing the changes (and pushing any further ones to the branch as needed), and ticking off the checklist on the PR, a reviewer needs to merge the PR
  3. This merge will then trigger the publishing to PyPI & the GH release

The instructions (currently in a draft PR) on cylc-admin: https://github.com/cylc/cylc-admin/blob/e5db64f73168cb639cc739b8fcb08a8a3dd34a5a/docs/howto/create-a-release.md

@hjoliver
Copy link
Member

Is there a way to dry-run test this @MetRonnie ? (Take a branch and disable the publish bit, I suppose?)

@MetRonnie
Copy link
Member Author

MetRonnie commented Nov 20, 2020

Is there a way to dry-run test this @MetRonnie ? (Take a branch and disable the publish bit, I suppose?)

Can clone the repo and add a continue-on-fail to the PyPI publish step (it will fail without the access token added to the repo)

@oliver-sanders
Copy link
Member

Could add switch to publish to the pypi test repo.

Comment on lines 55 to 57
prerelease: true
prerelease: ${{ env.PRERELEASE }}
Copy link
Member Author

Choose a reason for hiding this comment

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

Now possible due to cylc/release-actions#6

uses: pypa/gh-action-pypi-publish@v1.4.1
with:
user: __token__ # uses the API token feature of PyPI - least permissions possible
password: ${{ secrets.PYPI_TOKEN }}
Copy link
Member

Choose a reason for hiding this comment

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

Can use this to test without risking the cylc-flow package.

Suggested change
password: ${{ secrets.PYPI_TOKEN }}
password: ${{ secrets.PYPI_TOKEN }}
repository_url: https://test.pypi.org/legacy/

Copy link
Member

Choose a reason for hiding this comment

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

Maybe document this in the file @MetRonnie ?

Copy link
Member

@oliver-sanders oliver-sanders left a comment

Choose a reason for hiding this comment

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

Happy to push ahead with this as for other repos. Happy to create the token. Can test this out on the PyPi test repo if being cautious.

Copy link
Member

@hjoliver hjoliver left a comment

Choose a reason for hiding this comment

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

What @oliver-sanders said 👍

Not merging in case you want to add a comment as suggested above. And the token isn't done (can you do that Oliver, if you already now how?)

@MetRonnie
Copy link
Member Author

We can wait until trying out the same release process on cylc-sphinx-extensions for 1.3.0, likely to be today

@MetRonnie MetRonnie marked this pull request as draft December 3, 2020 17:31
@MetRonnie
Copy link
Member Author

Forgot to undraft this. Just rebased to fix merge conflict

Copy link
Member

@hjoliver hjoliver left a comment

Choose a reason for hiding this comment

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

👍

@hjoliver hjoliver merged commit 6996eac into cylc:master Dec 21, 2020
@MetRonnie MetRonnie deleted the actions branch December 22, 2020 10:04
@MetRonnie
Copy link
Member Author

Demo run here - MetRonnie#4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure GH Actions, Codecov etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants