99jobs :
1010 release :
1111 name : Create GitHub Release
12- runs-on : windows-2025
12+ runs-on : ubuntu-22.04
1313 permissions :
1414 contents : write
1515
1616 steps :
1717 - name : Checkout
18- uses : actions/checkout@v4
18+ uses : actions/checkout@v3.1.0
1919 with :
2020 fetch-depth : 0
2121
@@ -26,54 +26,21 @@ jobs:
2626 file : ' pyproject.toml'
2727 field : ' tool.poetry.version'
2828
29- - name : Set up Python
30- uses : actions/setup-python@v5
31- with :
32- python-version : ' 3.10'
33-
34- - name : Install dependencies
35- shell : pwsh
36- run : |
37- python -m pip install --upgrade pip
38- pip install pyinstaller
39- pip install .
40-
41- - name : Build EXEs
42- shell : pwsh
43- run : |
44- pyinstaller correct_images_onefile.spec --noconfirm --clean
45- pyinstaller get_corrections_onefile.spec --noconfirm --clean
46- pyinstaller correct_images_gui_onefile.spec --noconfirm --clean
47-
48- - name : Create zip files
49- shell : pwsh
50- run : |
51- Set-Location $env:GITHUB_WORKSPACE
52- $version = "${{ steps.read_toml.outputs.value }}"
53-
54- if (Test-Path "dist/ImageryCorrector-$version.zip") { Remove-Item "dist/ImageryCorrector-$version.zip" }
55- if (Test-Path "dist/GetCorrectionsCsv-$version.zip") { Remove-Item "dist/GetCorrectionsCsv-$version.zip" }
56- if (Test-Path "dist/SenteraRadiometricCorrectionsGUI-$version.zip") { Remove-Item "dist/SenteraRadiometricCorrectionsGUI-$version.zip" }
57-
58- Compress-Archive -Path "dist/ImageryCorrector.exe" -DestinationPath "dist/ImageryCorrector-$version.zip"
59- Compress-Archive -Path "dist/GetCorrectionsCsv.exe" -DestinationPath "dist/GetCorrectionsCsv-$version.zip"
60- Compress-Archive -Path "dist/SenteraRadiometricCorrectionsGUI.exe" -DestinationPath "dist/SenteraRadiometricCorrectionsGUI-$version.zip"
61-
62-
63-
6429 - name : Define TAG
65- shell : pwsh
6630 run : |
67- "TAG=v ${{ steps.read_toml.outputs.value }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
68-
31+ export VERSION=" ${{ steps.read_toml.outputs.value }}"
32+ echo "TAG=v$VERSION" >> $GITHUB_ENV
6933 - name : Create Release
70- uses : softprops/action-gh-release@v2
34+ uses : actions/github-script@v6
7135 with :
72- tag_name : ${{ env.TAG }}
73- name : ${{ env.TAG }}
74- target_commitish : ${{ github.sha }}
75- generate_release_notes : true
76- files : |
77- dist/ImageryCorrector-${{ steps.read_toml.outputs.value }}.zip
78- dist/GetCorrectionsCsv-${{ steps.read_toml.outputs.value }}.zip
79- dist/SenteraRadiometricCorrectionsGUI-${{ steps.read_toml.outputs.value }}.zip
36+ result-encoding : string
37+ retries : 3
38+ script : |
39+ github.rest.repos.createRelease({
40+ owner: context.repo.owner,
41+ repo: context.repo.repo,
42+ tag_name: process.env.TAG,
43+ target_commitish: context.sha,
44+ name: process.env.TAG,
45+ generate_release_notes: true
46+ })
0 commit comments