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

CI Failure - Releasing and Duplicate Runs #76

Closed
TheTripleV opened this issue Oct 29, 2022 · 4 comments
Closed

CI Failure - Releasing and Duplicate Runs #76

TheTripleV opened this issue Oct 29, 2022 · 4 comments

Comments

@TheTripleV
Copy link
Member

  1. There are duplicate runs on push tag and create tag that should be eliminated
  2. Publishing to PyPi fails (https://github.com/wpilibsuite/sphinxext-opengraph/actions/runs/3353106081/jobs/5555742517#step:4:12)
    The built wheel is incorrectly versioned. The correct version is picked up but is replaced at some point with the branch name of "main".
@auscompgeek
Copy link
Member

auscompgeek commented Oct 30, 2022

The built wheel is incorrectly versioned. The correct version is picked up but is replaced at some point with the branch name of "main".

I think the setup.py is overwriting the version in the sdist when building the wheel since it fails to run git describe in the isolated environment (which is a temporary directory).

@hugovk
Copy link
Contributor

hugovk commented Oct 30, 2022

Yeah, I thought it was because https://github.com/actions/checkout does a shallow checkout by default, so we need to fetch all tags:

https://github.com/actions/checkout#Fetch-all-history-for-all-tags-and-branches

But I added that in PR #79 but it still fails.

We can see it gets the tag for the sdist but not the wheel:

Successfully built sphinxext-opengraph-0.7.0.tar.gz and sphinxext_opengraph-main-py3-none-any.whl

Printing the exception:

try:
    ret = subprocess.run(
        "git describe --tags --abbrev=0",
        capture_output=True,
        check=True,
        shell=True,
    )
    version = ret.stdout.decode("utf-8").strip()
except Exception as e:
    print(e)
    version = "main"

Gives:

Command 'git describe --tags --abbrev=0' returned non-zero exit status 128.

@hugovk
Copy link
Contributor

hugovk commented Oct 31, 2022

For the first one, I think we want something like:

on:
  push:
    tags:
    - '*'

https://github.com/jazzband/django-taggit/blob/b24dfc401a44c247f44d82705f19d00d1f5d9ca7/.github/workflows/release.yml#L3-L6

Rather than:

on:
  create:
    tags:
      - '*'

@TheTripleV
Copy link
Member Author

Closed in #79 and #80.
https://pypi.org/project/sphinxext-opengraph/0.7.1/

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

No branches or pull requests

3 participants