mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Configure trusted publishing for PyPI file upload (#137607)
This commit is contained in:
parent
b86bb75e5e
commit
597c0ab985
16
.github/workflows/builder.yml
vendored
16
.github/workflows/builder.yml
vendored
@ -448,6 +448,9 @@ jobs:
|
|||||||
environment: ${{ needs.init.outputs.channel }}
|
environment: ${{ needs.init.outputs.channel }}
|
||||||
needs: ["init", "build_base"]
|
needs: ["init", "build_base"]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
id-token: write
|
||||||
if: github.repository_owner == 'home-assistant' && needs.init.outputs.publish == 'true'
|
if: github.repository_owner == 'home-assistant' && needs.init.outputs.publish == 'true'
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout the repository
|
- name: Checkout the repository
|
||||||
@ -473,16 +476,13 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
# Remove dist, build, and homeassistant.egg-info
|
# Remove dist, build, and homeassistant.egg-info
|
||||||
# when build locally for testing!
|
# when build locally for testing!
|
||||||
pip install twine build
|
pip install build
|
||||||
python -m build
|
python -m build
|
||||||
|
|
||||||
- name: Upload package
|
- name: Upload package to PyPI
|
||||||
shell: bash
|
uses: pypa/gh-action-pypi-publish@v1.12.4
|
||||||
run: |
|
with:
|
||||||
export TWINE_USERNAME="__token__"
|
skip-existing: true
|
||||||
export TWINE_PASSWORD="${{ secrets.TWINE_TOKEN }}"
|
|
||||||
|
|
||||||
twine upload dist/* --skip-existing
|
|
||||||
|
|
||||||
hassfest-image:
|
hassfest-image:
|
||||||
name: Build and test hassfest image
|
name: Build and test hassfest image
|
||||||
|
Loading…
x
Reference in New Issue
Block a user