mirror of
https://github.com/esphome/esphome.git
synced 2024-11-10 09:17:46 +01:00
Use trusted publishing token for pypi (#6545)
This commit is contained in:
parent
ca5d38f413
commit
83feae4eb2
1 changed files with 6 additions and 8 deletions
14
.github/workflows/release.yml
vendored
14
.github/workflows/release.yml
vendored
|
@ -47,6 +47,9 @@ jobs:
|
||||||
name: Build and publish to PyPi
|
name: Build and publish to PyPi
|
||||||
if: github.repository == 'esphome/esphome' && github.event_name == 'release'
|
if: github.repository == 'esphome/esphome' && github.event_name == 'release'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
id-token: write
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4.1.1
|
- uses: actions/checkout@v4.1.1
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
|
@ -56,16 +59,11 @@ jobs:
|
||||||
- name: Set up python environment
|
- name: Set up python environment
|
||||||
env:
|
env:
|
||||||
ESPHOME_NO_VENV: 1
|
ESPHOME_NO_VENV: 1
|
||||||
run: |
|
run: script/setup
|
||||||
script/setup
|
|
||||||
pip install twine
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: python setup.py sdist bdist_wheel
|
run: python setup.py sdist bdist_wheel
|
||||||
- name: Upload
|
- name: Publish
|
||||||
env:
|
uses: pypa/gh-action-pypi-publish@v1.8.14
|
||||||
TWINE_USERNAME: __token__
|
|
||||||
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
|
|
||||||
run: twine upload dist/*
|
|
||||||
|
|
||||||
deploy-docker:
|
deploy-docker:
|
||||||
name: Build ESPHome ${{ matrix.platform }}
|
name: Build ESPHome ${{ matrix.platform }}
|
||||||
|
|
Loading…
Reference in a new issue