Fix more ESLint issues #332
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: | |
| push: | |
| branches: ['main'] | |
| pull_request: | |
| branches: ['main'] | |
| jobs: | |
| test-plugin: | |
| name: Check formatting | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| - name: Install PNPM | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install Dependencies | |
| run: pnpm install | |
| - name: Run tests | |
| run: pnpm run test | |
| build-plugin: | |
| name: Build plugin | |
| runs-on: ubuntu-latest | |
| needs: [test-plugin] | |
| steps: | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| - name: Install PNPM | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install Dependencies | |
| run: pnpm run setup | |
| - name: Build plugin | |
| run: pnpm run build:plugin | |
| - name: Unzip plugin | |
| run: | | |
| mkdir /tmp/artifacts -p | |
| unzip out/moondeck.zip -d /tmp/artifacts | |
| - name: Upload package | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: moondeck | |
| path: /tmp/artifacts/moondeck | |
| if-no-files-found: error | |
| build-cli: | |
| name: Build CLI | |
| strategy: | |
| matrix: | |
| config: | |
| - os: ubuntu-22.04 | |
| ext: bin | |
| artifact-postix: linux | |
| sep: ":" | |
| - os: windows-latest | |
| ext: exe | |
| artifact-postix: win | |
| sep: ";" | |
| runs-on: ${{ matrix.config.os }} | |
| needs: [test-plugin] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.13" | |
| - name: Download externals | |
| shell: bash | |
| run: "cd ./defaults/python && rm externals -rf && pip install -r ./requirements.txt -t ./externals" | |
| - name: Build | |
| uses: Nuitka/Nuitka-Action@main | |
| env: | |
| PYTHONPATH: "./lib${{ matrix.config.sep }}./externals" | |
| with: | |
| working-directory: ./defaults/python | |
| nuitka-version: main | |
| script-name: cli.py | |
| mode: onefile | |
| include-data-files: ./ssl/moondeck_cert.pem=./ssl/moondeck_cert.pem | |
| include-package: lib.cli | |
| prefer-source-code: true | |
| output-file: moondeck-cli-${{ matrix.config.artifact-postix }}.${{ matrix.config.ext }} | |
| - name: Upload Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: moondeck-cli-${{ matrix.config.artifact-postix }} | |
| path: ./defaults/python/build/*.${{ matrix.config.ext }} | |
| release-pre-check: | |
| name: Check for release conditions | |
| runs-on: ubuntu-latest | |
| outputs: | |
| do-release: ${{ steps.do-release.outputs.result }} | |
| steps: | |
| - name: Check if release can be performed | |
| id: do-release | |
| run: echo "result=${{ github.token != '' && github.ref == 'refs/heads/main' }}" >> "$GITHUB_OUTPUT" | |
| release: | |
| name: Nightly release | |
| needs: [build-plugin, build-cli, release-pre-check] | |
| runs-on: ubuntu-latest | |
| if: ${{ needs.release-pre-check.outputs.do-release == 'true' }} | |
| steps: | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Package release | |
| run: | | |
| cd ./artifacts/moondeck | |
| zip -r moondeck.zip * | |
| - name: Nightly Release | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| uses: andelf/nightly-release@main | |
| with: | |
| body: The latest version available! Might be broken, might be not ;) | |
| prerelease: false | |
| tag_name: nightly | |
| name: 'Nightly Release' | |
| files: | | |
| ./artifacts/moondeck/moondeck.zip | |
| ./artifacts/moondeck-cli-*/* |