Fix release workflow working directory #5
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: MiniPixels CI | |
| on: | |
| push: | |
| branches: [main] | |
| tags: ["v*"] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: write | |
| jobs: | |
| windows: | |
| name: Windows tests and examples | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout MiniPixels | |
| uses: actions/checkout@v5 | |
| with: | |
| path: MiniPixels | |
| - name: Checkout MiniLangCompilerPy | |
| uses: actions/checkout@v5 | |
| with: | |
| repository: MiniLangProject/MiniLangCompilerPy | |
| path: MiniLangCompilerPy | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Run MiniPixels tests | |
| working-directory: MiniPixels | |
| run: python tests\run_tests.py | |
| - name: Build examples | |
| working-directory: MiniPixels | |
| run: python tools\build_examples.py | |
| - name: Package SDK | |
| working-directory: MiniPixels | |
| run: python tools\package_sdk.py | |
| - name: Upload SDK artifact | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: minipixels-sdk | |
| path: | | |
| MiniPixels/dist/*-sdk.zip | |
| MiniPixels/dist/*.sha256 | |
| compression-level: 0 | |
| - name: Publish GitHub release | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| shell: pwsh | |
| working-directory: MiniPixels | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| $tag = "${{ github.ref_name }}" | |
| $assets = @("dist/*-sdk.zip", "dist/*.sha256") | |
| gh release view $tag *> $null | |
| if ($LASTEXITCODE -eq 0) { | |
| gh release upload $tag @assets --clobber | |
| } else { | |
| gh release create $tag @assets --title "MiniPixels $tag" --generate-notes | |
| } |