release #1
Workflow file for this run
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: Deploy | Semantic Release | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| dry_run: | |
| description: 'Dry run (no changes will be committed)' | |
| type: boolean | |
| default: false | |
| debug: | |
| description: 'Enable verbose debugging output' | |
| type: boolean | |
| default: false | |
| push: | |
| branches: | |
| - '**' | |
| paths-ignore: | |
| - 'docs/**' | |
| - '*.md' | |
| - '.github/workflows/deploy-pypi-packages.yaml' | |
| jobs: | |
| release: | |
| runs-on: windows-latest | |
| concurrency: release | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set run mode | |
| id: set_mode | |
| run: | | |
| $isDryRun = "${{ github.event_name == 'push' || inputs.dry_run }}" -eq "true" | |
| echo "is_dry_run=$isDryRun" >> $env:GITHUB_OUTPUT | |
| echo "Mode: $($isDryRun ? 'Dry run' : 'Full release')" | |
| - name: Python Release - Dry Run | |
| id: release_dryrun | |
| if: steps.set_mode.outputs.is_dry_run == 'True' | |
| uses: python-semantic-release/python-semantic-release@v9.20.0 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| push: "false" | |
| commit: "false" | |
| tag: "false" | |
| changelog: "false" | |
| root_options: ${{ inputs.debug && '-vv --noop' || '-v --noop' }} | |
| - name: Python Release | |
| id: release | |
| if: ${{ github.event_name == 'workflow_dispatch' && !inputs.dry_run }} | |
| uses: python-semantic-release/python-semantic-release@v9.20.0 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| push: "true" | |
| changelog: "true" | |
| root_options: ${{ inputs.debug && '-vv' || '-v' }} | |
| - name: Create Step Summary | |
| run: | | |
| $isDryRun = "${{ steps.set_mode.outputs.is_dry_run }}" -eq "True" | |
| $releaseId = $isDryRun ? "release_dryrun" : "release" | |
| $wasReleased = "${{ steps.release_dryrun.outputs.released || steps.release.outputs.released }}" -eq "true" | |
| $version = "${{ steps.release_dryrun.outputs.version || steps.release.outputs.version }}" | |
| $tag = "${{ steps.release_dryrun.outputs.tag || steps.release.outputs.tag }}" | |
| # Display trigger information | |
| $triggerInfo = if ("${{ github.event_name }}" -eq "push") { | |
| "Triggered by push to branch: ${{ github.ref_name }}" | |
| } else { | |
| "Triggered manually via workflow dispatch" | |
| } | |
| @" | |
| # MQPy Release $($isDryRun ? "(Dry Run)" : "") | |
| ## Release Summary | |
| $triggerInfo | |
| $($isDryRun ? "⚠️ This is a dry run - no changes were committed" : "") | |
| Current/Next Version: $version | |
| Current/Next Tag: $tag | |
| Release required: $($wasReleased ? "Yes" : "No") | |
| ## Installation Instructions | |
| ### Important Warning ⚠️ | |
| !!! warning "Trading Risk Warning" | |
| **IMPORTANT: Trading involves substantial risk of loss and is not suitable for all investors.** | |
| - Always use a **demo account** with fake money when testing strategies | |
| - MQPy is provided for **educational purposes only** | |
| - Past performance is not indicative of future results | |
| - Never trade with money you cannot afford to lose | |
| - The developers are not responsible for any financial losses | |
| ### Windows-Only Compatibility | |
| This package is designed to work exclusively on Windows operating systems. | |
| ### Installation Steps | |
| ``` | |
| pip install mqpy==$version | |
| ``` | |
| ### Documentation | |
| For complete documentation, visit our [GitHub repository](https://github.com/Joaopeuko/Mql5-Python-Integration). | |
| "@ | Out-File -FilePath $env:GITHUB_STEP_SUMMARY |