Teste em QT #10
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 And Release | ||
| permissions: | ||
| contents: write | ||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: | ||
| - main | ||
| tags: | ||
| - "v*" | ||
| jobs: | ||
| build: | ||
| name: Build (${{ matrix.label }}) | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - os: ubuntu-latest | ||
| label: linux-x64 | ||
| shell: bash | ||
| command: bash ./build.sh | ||
| artifact_name: ContExt-linux-x64 | ||
| artifact_path: release/ContExt-linux-x64.tar.gz | ||
| - os: windows-latest | ||
| label: windows-x64 | ||
| shell: cmd | ||
| command: build.cmd | ||
| artifact_name: ContExt-windows-x64 | ||
| artifact_path: release/ContExt-windows-x64.zip | ||
| - os: macos-latest | ||
| label: macos | ||
| shell: bash | ||
| command: bash ./build-macos.sh | ||
| artifact_name: ContExt-macos | ||
| artifact_path: release/ContExt-macos-*.app.zip | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: "3.13" | ||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| python -m pip install . | ||
| - name: Build artifact | ||
| shell: ${{ matrix.shell }} | ||
| run: ${{ matrix.command }} | ||
| - name: Upload workflow artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ${{ matrix.artifact_name }} | ||
| path: ${{ matrix.artifact_path }} | ||
| if-no-files-found: error | ||
| release: | ||
| name: Publish Release | ||
| if: startsWith(github.ref, 'refs/tags/v') | ||
| needs: build | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Download build artifacts | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| path: release-assets | ||
| - name: Publish GitHub release assets | ||
| uses: softprops/action-gh-release@v2 | ||
| with: | ||
| files: release-assets/**/* | ||