fix: Update version to 2.3.5 #265
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| cache: "pip" | |
| - name: Install dependencies and PyInstaller | |
| run: pip install -r requirements.txt pyinstaller -U | |
| - name: Build Executables | |
| run: | | |
| # Build GUI | |
| pyinstaller -y -F -w -i "extra/DUCE-LOGO.ico" --clean --name "DUCE-GUI-windows" ` | |
| --add-data "base.py;." ` | |
| --add-data "default-duce-gui-settings.json;." ` | |
| --add-data "README.md;." ` | |
| --add-data "LICENSE;." ` | |
| "gui.py" | |
| # Build CLI | |
| pyinstaller -y -F -c -i "extra/DUCE-LOGO.ico" --clean --name "DUCE-CLI-windows" ` | |
| --add-data "base.py;." ` | |
| --add-data "default-duce-cli-settings.json;." ` | |
| --add-data "README.md;." ` | |
| --add-data "LICENSE;." ` | |
| "cli.py" | |
| - name: Upload Windows Package | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: DUCE-windows-package | |
| path: ./dist/ | |
| - name: Get Version | |
| if: github.event_name == 'workflow_dispatch' | |
| id: get_version | |
| shell: pwsh | |
| run: | | |
| $version = (Select-String -Path .\base.py -Pattern 'VERSION = "(v.*?)"').Matches.Groups[1].Value | |
| echo "VERSION=$version" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append | |
| echo "TAG=$version" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append | |
| - name: Create Draft Release and Tag | |
| if: github.event_name == 'workflow_dispatch' | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ steps.get_version.outputs.TAG }} | |
| name: ${{ steps.get_version.outputs.TAG }} | |
| body: | | |
| Draft release for version ${{ steps.get_version.outputs.TAG }} | |
| draft: true | |
| prerelease: false | |
| files: | | |
| ./dist/* |