Skip to content

Commit bf59d85

Browse files
Update release.yml
1 parent 886dcbf commit bf59d85

1 file changed

Lines changed: 21 additions & 17 deletions

File tree

.github/workflows/release.yml

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,39 +9,43 @@ permissions:
99
contents: write
1010

1111
jobs:
12+
sonar-scan:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
- name: SonarCloud Scan
20+
uses: SonarSource/sonarcloud-github-action@v3.1.0
21+
env:
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23+
SONAR_TOKEN: ${{ secrets.BULK_FOLDER_SCAN }}
24+
1225
build:
26+
needs: sonar-scan
1327
runs-on: windows-latest
14-
1528
steps:
1629
- name: Checkout code
1730
uses: actions/checkout@v4
18-
with:
19-
fetch-depth: 0 # Important pour SonarCloud (besoin de l'historique git)
2031

2132
- name: Set up Python
2233
uses: actions/setup-python@v5
2334
with:
24-
python-version: '3.11' #
35+
python-version: '3.11'
2536

2637
- name: Install dependencies
2738
run: |
2839
python -m pip install --upgrade pip
29-
pip install pyinstaller customtkinter matplotlib #
30-
31-
# --- NOUVELLE PHASE : SONARCLOUD SCAN ---
32-
- name: SonarCloud Scan
33-
uses: SonarSource/sonarcloud-github-action@master
34-
env:
35-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Automatique
36-
SONAR_TOKEN: ${{ secrets.BULK_FOLDER_SCAN }} # Votre variable personnalisée
40+
pip install pyinstaller customtkinter matplotlib
3741
3842
- name: Get version from XML
3943
id: get_version
4044
shell: powershell
4145
run: |
4246
[xml]$project = Get-Content "project_info.xml"
4347
$version = $project.project.version
44-
echo "VERSION=$version" >> $env:GITHUB_OUTPUT #
48+
echo "VERSION=$version" >> $env:GITHUB_OUTPUT
4549
4650
- name: Create version_info.txt
4751
shell: powershell
@@ -63,18 +67,18 @@ jobs:
6367
VarFileInfo([VarStruct(u'Translation', [1033, 1200])])]
6468
)
6569
"@
66-
$template | Out-File -FilePath version_info.txt -Encoding utf8 #
70+
$template | Out-File -FilePath version_info.txt -Encoding utf8
6771
6872
- name: Build EXE with PyInstaller
6973
run: |
7074
echo "import sys, os; sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'src')); from bulkfolder.ui.main import main; main()" > run.py
71-
python -m PyInstaller --noconfirm --windowed --name "BulkFolder" --icon="src/assets/logo.ico" --add-data="src/assets;assets" --paths="src" --version-file="version_info.txt" --collect-all customtkinter run.py #
75+
python -m PyInstaller --noconfirm --windowed --name "BulkFolder" --icon="src/assets/logo.ico" --add-data="src/assets;assets" --paths="src" --version-file="version_info.txt" --collect-all customtkinter run.py
7276
7377
- name: Compile Inno Setup
7478
shell: pwsh
7579
run: |
7680
$ver = "${{ steps.get_version.outputs.VERSION }}"
77-
& "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /DMyAppVersion=$ver "installer_script.iss" #
81+
& "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /DMyAppVersion=$ver "installer_script.iss"
7882
7983
- name: Create Release
8084
uses: softprops/action-gh-release@v1
@@ -83,4 +87,4 @@ jobs:
8387
name: Release v${{ steps.get_version.outputs.VERSION }}
8488
files: Output/*.exe
8589
env:
86-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} #
90+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)