Skip to content

Commit

Permalink
ci(tools): Fix pushing python tools
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasssvaz committed Jun 6, 2024
1 parent cc40edb commit 21a318c
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/build_py_tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,11 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 2
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Verify Python Tools Changed
uses: tj-actions/changed-files@v41
id: verify-changed-files
with:
fetch_depth: '2'
since_last_remote_commit: 'true'
files: |
tools/get.py
Expand Down Expand Up @@ -72,6 +71,15 @@ jobs:
DISTPATH: pytools-${{ matrix.TARGET }}
PIP_EXTRA_INDEX_URL: "https://dl.espressif.com/pypi"
steps:
- id: create_token
uses: tibdex/github-app-token@v2
env:
ID: ${{ secrets.TOOLS_UPLOAD_APP_ID }}
TOKEN: ${{ secrets.TOOLS_UPLOAD_APP_TOKEN }}
with:
app_id: "${{ env.ID }}"
private_key: "${{ env.TOKEN }}"

- name: List changed tools
shell: bash
run: |
Expand All @@ -89,8 +97,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.TOOLS_UPLOAD_PAT }}
ref: ${{ github.event.pull_request.head.ref }}
token: ${{ steps.create_token.outputs.token }}
- name: Set up Python 3.8
# Skip setting python on ARM because of missing compatibility: https://github.com/actions/setup-python/issues/108
if: matrix.os != 'ARM' && matrix.os != 'ARM64'
Expand All @@ -108,7 +115,7 @@ jobs:
pyinstaller --distpath ./${{ env.DISTPATH }} -F --icon=.github/pytools/espressif.ico tools/$tool.py
done
- name: Sign binaries
if: matrix.os == 'windows-latest' && env.CERTIFICATE != '' && env.CERTIFICATE_PASSWORD != ''
if: matrix.os == 'windows-latest' && env.CERTIFICATE != ''
env:
CERTIFICATE: ${{ secrets.CERTIFICATE }}
CERTIFICATE_PASSWORD: ${{ secrets.CERTIFICATE_PASSWORD }}
Expand Down

0 comments on commit 21a318c

Please sign in to comment.