Skip to content

Commit f18e577

Browse files
authored
Merge pull request #4 from espressif/trusted-publisher
feat: update publish pipeline
2 parents 38cb76b + 9b9cc81 commit f18e577

File tree

3 files changed

+22
-10
lines changed

3 files changed

+22
-10
lines changed

.github/workflows/publish-pypi.yml

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,30 @@ on:
66
- 'v*'
77

88
jobs:
9-
deploy:
10-
runs-on: ubuntu-latest
9+
pypi-publish:
10+
name: Upload release to PyPI
11+
runs-on: ubuntu-22.04
12+
# Specifying a GitHub environment is optional, but strongly encouraged
13+
environment: pypi
14+
permissions:
15+
# IMPORTANT: this permission is mandatory for Trusted Publishing
16+
id-token: write
17+
1118
steps:
1219
- uses: actions/checkout@v4
13-
- uses: actions/setup-python@v5
20+
21+
- name: Set up Python
22+
uses: actions/setup-python@v5
1423
with:
1524
python-version: '3.7'
16-
- name: Publish packages
17-
env:
18-
FLIT_USERNAME: __token__
19-
FLIT_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
25+
26+
- name: Install dependencies
2027
run: |
28+
python -m pip install --upgrade pip
2129
pip install flit
22-
flit publish --setup-py
30+
31+
- name: Build package
32+
run: flit build
33+
34+
- name: Publish package distributions to PyPI
35+
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/test-build-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55

66
jobs:
77
build-docs:
8-
runs-on: ubuntu-latest
8+
runs-on: ubuntu-22.04
99
steps:
1010
- uses: actions/checkout@v4
1111
- name: Set up Python

esp_bool_parser/bool_parser.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ def get_value(self, target: str, config_name: str) -> t.Any:
7676
if self.attr == 'CONFIG_NAME':
7777
return config_name
7878

79-
# for non-keyword cap words, check if it is defined in the environment variables
8079
if self.attr in os.environ:
8180
return os.environ[self.attr]
8281

0 commit comments

Comments
 (0)