| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # Keep GitHub Actions up to date with GitHub's Dependabot... | ||
| # https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot | ||
| # https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#package-ecosystem | ||
| version: 2 | ||
| updates: | ||
| - package-ecosystem: github-actions | ||
| directory: / | ||
| groups: | ||
| github-actions: | ||
| patterns: | ||
| - "*" # Group all Actions updates into a single larger pull request | ||
| schedule: | ||
| interval: weekly |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,120 @@ | ||
| name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI | ||
|
|
||
| on: push | ||
|
|
||
| jobs: | ||
| build: | ||
| name: Build distribution 📦 | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| persist-credentials: false | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: "3.x" | ||
| - name: Install pypa/build | ||
| run: >- | ||
| python3 -m | ||
| pip install | ||
| build | ||
| --user | ||
| - name: Build a binary wheel and a source tarball | ||
| run: python3 -m build | ||
| - name: Store the distribution packages | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: python-package-distributions | ||
| path: dist/ | ||
|
|
||
| publish-to-pypi: | ||
| name: >- | ||
| Publish Python 🐍 distribution 📦 to PyPI | ||
| if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes | ||
| needs: | ||
| - build | ||
| runs-on: ubuntu-latest | ||
| environment: | ||
| name: pypi | ||
|
Comment thread
Comment on lines
+39
to
+40
Copy link
Copy Markdown
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityI have added publisher on pypi Repository: cpplint/cpplint However, I am a bit concerned about this bit - has a "pypi" environment been created in the Github repo settings?
Sorry, something went wrong.
All reactions
Copy link
Copy Markdown
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityEveryone in the cpplint org can see that tab; I don't think you accepted the maintainer invite. Could you check all your folders for the subject [GitHub] @mattyclarkson has invited you to join the @cpplint organization dated 9.5 hours ago, xx:30? I also just sent you another one a few minutes ago. Anyways, I see there's a "testpypi" environment with nothing in it. I suspect that to be a test thing from many years ago and that @cclauss has perhaps yet to set up the environment.
Sorry, something went wrong.
All reactions
Copy link
Copy Markdown
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityI think I can move this forward but I will need a few days to look into it.
Sorry, something went wrong.
aaronliu0130 and jayvdb reacted with thumbs up emoji
All reactions
Copy link
Copy Markdown
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality
Can you please add a second publisher with the same settings but on:
Sorry, something went wrong.
All reactions
|
||
| url: https://pypi.org/p/cpplint | ||
| permissions: | ||
| id-token: write # IMPORTANT: mandatory for trusted publishing | ||
|
|
||
| steps: | ||
| - name: Download all the dists | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: python-package-distributions | ||
| path: dist/ | ||
| - name: Publish distribution 📦 to PyPI | ||
| uses: pypa/gh-action-pypi-publish@release/v1 | ||
|
|
||
| github-release: | ||
| name: >- | ||
| Sign the Python 🐍 distribution 📦 with Sigstore | ||
| and upload them to GitHub Release | ||
| needs: | ||
| - publish-to-pypi | ||
| runs-on: ubuntu-latest | ||
|
|
||
| permissions: | ||
| contents: write # IMPORTANT: mandatory for making GitHub Releases | ||
| id-token: write # IMPORTANT: mandatory for sigstore | ||
|
|
||
| steps: | ||
| - name: Download all the dists | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: python-package-distributions | ||
| path: dist/ | ||
| - name: Sign the dists with Sigstore | ||
| uses: sigstore/gh-action-sigstore-python@v3.0.0 | ||
| with: | ||
| inputs: >- | ||
| ./dist/*.tar.gz | ||
| ./dist/*.whl | ||
| - name: Create GitHub Release | ||
| env: | ||
| GITHUB_TOKEN: ${{ github.token }} | ||
| run: >- | ||
| gh release create | ||
| "$GITHUB_REF_NAME" | ||
| --repo "$GITHUB_REPOSITORY" | ||
| --notes "" | ||
| - name: Upload artifact signatures to GitHub Release | ||
| env: | ||
| GITHUB_TOKEN: ${{ github.token }} | ||
| # Upload to GitHub Release using the `gh` CLI. | ||
| # `dist/` contains the built packages, and the | ||
| # sigstore-produced signatures and certificates. | ||
| run: >- | ||
| gh release upload | ||
| "$GITHUB_REF_NAME" dist/** | ||
| --repo "$GITHUB_REPOSITORY" | ||
|
|
||
| publish-to-testpypi: | ||
| name: Publish Python 🐍 distribution 📦 to TestPyPI | ||
| needs: | ||
| - build | ||
| runs-on: ubuntu-latest | ||
|
|
||
| environment: | ||
| name: testpypi | ||
| url: https://test.pypi.org/p/cpplint | ||
|
|
||
| permissions: | ||
| id-token: write # IMPORTANT: mandatory for trusted publishing | ||
|
|
||
| steps: | ||
| - name: Download all the dists | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: python-package-distributions | ||
| path: dist/ | ||
| # TODO(cclauss): Uncomment this job step when we have admin access to test.pypi.org | ||
| # - name: Publish distribution 📦 to TestPyPI | ||
| # uses: pypa/gh-action-pypi-publish@release/v1 | ||
| # with: | ||
| # repository-url: https://test.pypi.org/legacy/ | ||
| Back | FazBrowse Home | New Git URL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityAre you sure this should be run every commit?
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityYes. We want to build each push but the process will stop at line 35 if this is not a release.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityNot sure why we need to build each push.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityKnowing when we can no longer build the project is quite a useful diagnostic.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityYou can try proposing changes to https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/#the-whole-ci-cd-workflow
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityIt says that it's "One popular choice". IMO build breaking while the normal CI doesn't break would be so rare that testing it only on tag push is enough (we don't need to release when we push a tag).
That said, I don't care about this facet too much.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.