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

Fix a condition check on PyPI release workflow #52

Closed

Conversation

horizon-blue
Copy link
Contributor

@horizon-blue horizon-blue commented Nov 3, 2020

Summary:

  1. There was a small bug in the PyPI release workflow where I accidentally inverted the true/false condition on whether a new version should be released or not.
  2. However, (1) means that the workflow should've been triggered. The only reason it wasn't is that, by default, the checkout action only pull the latest commit without any history... so using git tag in workflow does not return anything
  3. To fix (2), we should use git ls-remote to check the existing tags on GitHub (instead of listing the local ones). Cloning the repo with full history also works, but is much less efficient.

This is how it would look like in README.md:

image

Differential Revision: D24696408

Summary:
1. There was a small bug in the PyPI release workflow where I accidentally inverted the true/false condition on whether a new version should be released or not.
2. However, (1) means that the workflow should've been triggered. The only reason it wasn't is that, by default, the `checkout` action only pull the latest commit without any history... [so using `git tag` in workflow does not return anything](actions/checkout#100)
3. To fix (2), we should use `git ls-remote` to check the existing tags on GitHub (instead of listing the local ones). Cloning the repo with full history also works, but is much less efficient.

Differential Revision: D24696408

fbshipit-source-id: 40b28124ccbb412fceb0da8784c888e88dc51f2e
@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported labels Nov 3, 2020
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D24696408

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 44b0632.

facebook-github-bot pushed a commit to facebookincubator/flowtorch that referenced this pull request May 14, 2021
Summary:
### Motivation

We are bitten by actions/checkout#100 [yet again](facebookresearch/pplbench#52), so lets just fetch the tags during checkout.

### Changes proposed

Fetch tags during `actions/checkout`

Pull Request resolved: #33

Test Plan: https://github.com/facebookincubator/flowtorch/runs/2586537945?check_suite_focus=true

Reviewed By: jpchen, horizon-blue

Differential Revision: D28449241

Pulled By: feynmanliang

fbshipit-source-id: bf7224961a28fc7b2fd1e4733e519be6e0030590
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants