Potential fix for code scanning alert no. 1: Workflow does not contain permissions #114
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: CI | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| branches: [ master, develop ] | |
| pull_request: | |
| branches: [ master, develop ] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [windows-latest, macos-13] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| architecture: x64 | |
| - name: Download UPX [windows-latest] | |
| uses: i3h/download-release-asset@v1 | |
| if: ${{ matrix.os == 'windows-latest' }} | |
| with: | |
| owner: upx | |
| repo: upx | |
| tag: v4.2.1 | |
| file: upx-4.2.1-win64.zip | |
| - name: Extract UPX [windows-latest] | |
| if: ${{ matrix.os == 'windows-latest' }} | |
| run: | | |
| 7z x upx-4.2.1-win64.zip | |
| copy upx-4.2.1-win64\upx.exe upx.exe | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install pipenv | |
| python -m pipenv install --dev | |
| - name: Test | |
| run: python -m pipenv run pytest | |
| - name: Build [windows-latest] | |
| if: ${{ matrix.os == 'windows-latest' }} | |
| run: python -m pipenv run build_win_installer.bat | |
| - name: Upload a Build Artifact [windows-latest] | |
| uses: actions/upload-artifact@v4 | |
| if: ${{ matrix.os == 'windows-latest' }} | |
| with: | |
| name: shortcircuit.exe | |
| path: ./dist/shortcircuit.exe | |
| - name: Additional dependencies [macos-13] | |
| if: ${{ matrix.os == 'macos-13' }} | |
| run: python -m pipenv install macholib | |
| - name: Build [macos-13] | |
| if: ${{ matrix.os == 'macos-13' }} | |
| run: python -m pipenv run ./build_mac_installer.sh | |
| - name: Upload a Build Artifact [macos-13] | |
| uses: actions/upload-artifact@v4 | |
| if: ${{ matrix.os == 'macos-13' }} | |
| with: | |
| name: shortcircuit.app.tar.gz | |
| path: ./dist/shortcircuit.app.tar.gz |