4
4
pull_request :
5
5
paths :
6
6
- ' tools/get.py'
7
+ - ' tools/espota.py'
8
+ - ' tools/gen_esp32part.py'
9
+ - ' tools/gen_insights_package.py'
7
10
8
11
jobs :
9
12
find-changed-tools :
26
29
since_last_remote_commit : ' true'
27
30
files : |
28
31
tools/get.py
32
+ tools/espota.py
33
+ tools/gen_esp32part.py
34
+ tools/gen_insights_package.py
29
35
- name : List all changed files
30
36
shell : bash
31
37
run : |
69
75
- name : List all changed files
70
76
shell : bash
71
77
run : |
78
+ CHANGED_FILES=()
72
79
for file in ${{ needs.find-changed-tools.outputs.all_changed_files }}; do
73
- echo "$file was changed"
80
+ echo "$file got changed"
81
+ file="${file#*\/}"
82
+ file="${file%\.*}"
83
+ CHANGED_FILES+=("$file")
84
+ done
85
+ CHANGED_FILES="${CHANGED_FILES[@]}"
86
+ echo "CHANGED_TOOLS=$CHANGED_FILES" >> "$GITHUB_ENV"
87
+ for tool in ${{ env.CHANGED_TOOLS }}; do
88
+ echo "tool $tool was changed"
74
89
done
75
90
- name : Checkout repository
76
91
uses : actions/checkout@v3
@@ -87,30 +102,33 @@ jobs:
87
102
python -m pip install --upgrade pip
88
103
pip install pyinstaller requests
89
104
- name : Build with PyInstaller
90
- run : |
91
- pyinstaller --distpath ./${{ env.DISTPATH }} -F --icon=.github/pytools/espressif.ico tools/get.py
92
- - name : Sign binaries
93
- if : matrix.os == 'windows-latest'
94
- env :
95
- CERTIFICATE : ${{ secrets.CERTIFICATE }}
96
- CERTIFICATE_PASSWORD : ${{ secrets.CERTIFICATE_PASSWORD }}
97
- shell : pwsh
98
- run : |
99
- ./.github/pytools/Sign-File.ps1 -Path ./${{ env.DISTPATH }}/get.exe
100
- - name : Test binaries
101
105
shell : bash
102
106
run : |
103
- ./${{ env.DISTPATH }}/get${{ matrix.EXTEN }} -h
104
- # Commit and push changed files.
105
- - name : Push binary to tools
106
- if : matrix.os == 'windows-latest'
107
- env :
108
- GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
109
- run : |
110
- cp -Force ./${{ env.DISTPATH }}/get.exe tools/get.exe
111
- bash .github/scripts/upload_py_tools.sh
112
- - name : Archive artifact
113
- uses : actions/upload-artifact@master
114
- with :
115
- name : ${{ env.DISTPATH }}
116
- path : ${{ env.DISTPATH }}
107
+ for tool in ${{ env.CHANGED_TOOLS }}; do
108
+ echo "pyinstaller --distpath ./${{ env.DISTPATH }} -F --icon=.github/pytools/espressif.ico tools/$tool.py"
109
+ done
110
+ # pyinstaller --distpath ./${{ env.DISTPATH }} -F --icon=.github/pytools/espressif.ico tools/get.py
111
+ # - name: Sign binaries
112
+ # if: matrix.os == 'windows-latest'
113
+ # env:
114
+ # CERTIFICATE: ${{ secrets.CERTIFICATE }}
115
+ # CERTIFICATE_PASSWORD: ${{ secrets.CERTIFICATE_PASSWORD }}
116
+ # shell: pwsh
117
+ # run: |
118
+ # if exist ./${{ env.DISTPATH }}/get.exe ./.github/pytools/Sign-File.ps1 -Path ./${{ env.DISTPATH }}/get.exe
119
+ # - name: Test binaries
120
+ # shell: bash
121
+ # run: |
122
+ # ./${{ env.DISTPATH }}/get${{ matrix.EXTEN }} -h
123
+ # - name: Push binary to tools
124
+ # if: matrix.os == 'windows-latest'
125
+ # env:
126
+ # GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
127
+ # run: |
128
+ # cp -Force ./${{ env.DISTPATH }}/get.exe tools/get.exe
129
+ # bash .github/scripts/upload_py_tools.sh
130
+ # - name: Archive artifact
131
+ # uses: actions/upload-artifact@master
132
+ # with:
133
+ # name: ${{ env.DISTPATH }}
134
+ # path: ${{ env.DISTPATH }}
0 commit comments