-
-
Notifications
You must be signed in to change notification settings - Fork 18
chore: updates #137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
chore: updates #137
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
72f14ce
chore: updates
triniwiz 2afbc80
chore: nx migrate @nativescript/plugin-tools
NathanWalker 157afd3
chore: updates
triniwiz c39c29c
fix(canvas): support local paths
triniwiz 03854aa
feat: GPUCompilationInfo
triniwiz c9feb6f
fix(canvas): clean up context
triniwiz 7dae858
chore: rc12
triniwiz cd36597
chore: disable forceGL
triniwiz cb66829
fix: polyfills and media (#135)
herefishyfish ebc26d8
fix(canvas): filter out touch events by identifier (#136)
herefishyfish 19d03cc
chore: bump
triniwiz eaf11e0
fix: webgl creation
triniwiz a01b41f
chore: bump
triniwiz 5bd347b
chore: clean up
triniwiz 840d0b1
chore: improve userAgent
triniwiz 8f94caf
chore: bump
triniwiz 07c7c6f
fix: expose CustomEvent
triniwiz 70e6479
chore: bump
triniwiz 3327cae
fix: webgl video rendering
triniwiz bea85dd
chore: bump
triniwiz df59db7
fix: flipY
triniwiz 22ad3e9
chore: bump
triniwiz 8f8ab04
fix(ios): video gl video rendering
triniwiz 2b3f02e
feat: update wgpu & skia to the latest
triniwiz bd1e40e
chore: fixes & performance updates
triniwiz 08fde0d
fix: image leaks
triniwiz 18ffa23
chore(polyfil): polish
triniwiz 1673b5b
feat: support video elements in drawImage, texImage2D, texSubImage2D,…
triniwiz dad2172
chore: 2.0
triniwiz 21e2994
Potential fix for pull request finding 'CodeQL / Workflow does not co…
triniwiz 8238e6a
Potential fix for pull request finding 'CodeQL / Workflow does not co…
triniwiz 2ecc7ce
chore: bump
triniwiz 1d7e203
chore: bump libs
triniwiz ef4fbb7
chore: v2
triniwiz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,242 @@ | ||
| name: Publish Packages | ||
|
|
||
| permissions: | ||
| contents: read | ||
| packages: read | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - 'v*' | ||
| workflow_dispatch: | ||
| inputs: | ||
| npm_tag: | ||
| description: 'NPM tag to publish as (overrides default)' | ||
| required: false | ||
| default: 'latest' | ||
| dry_run: | ||
| description: 'Set to "true" to skip publishing and release upload (dry run)' | ||
| required: false | ||
| default: 'false' | ||
|
|
||
| permissions: | ||
| contents: read | ||
| env: | ||
| NPM_TAG: "latest" | ||
| NPM_PACKAGES: canvas,canvas-babylon,canvas-media,canvas-phaser,canvas-phaser-ce,canvas-pixi,canvas-polyfill,canvas-three,canvas-svg | ||
|
|
||
| jobs: | ||
| build-linux: | ||
| name: Build Linux native artifacts | ||
| runs-on: ubuntu-22.04 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Setup Node | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 22 | ||
|
|
||
| - name: Cache node modules | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: | | ||
| ~/.npm | ||
| ~/.cache | ||
| key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/package.json') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-node- | ||
|
|
||
| - name: Install Rust | ||
| run: | | ||
| curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal | ||
| echo "$HOME/.cargo/bin" >> $GITHUB_PATH | ||
|
|
||
| - name: Use Rust nightly | ||
| run: rustup default nightly | ||
| - name: Install deps (root) | ||
| run: npm ci | ||
|
|
||
| - name: Cache cargo | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: | | ||
| ~/.cargo/registry | ||
| ~/.cargo/git | ||
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-cargo- | ||
|
|
||
| - name: Build Android (make android) | ||
| run: | | ||
| set -e | ||
| make android | ||
|
|
||
| - name: Copy AAR into package | ||
| run: | | ||
| set -e | ||
| ./tools/scripts/copy-android.sh | ||
|
|
||
| - name: Upload Android platforms | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: android-platforms | ||
| path: packages/canvas/platforms/android | ||
|
|
||
| build-macos: | ||
| name: Build macOS native artifacts | ||
| runs-on: macos-14 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Setup Node | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 22 | ||
|
|
||
| - name: Cache node modules | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: | | ||
| ~/.npm | ||
| ~/.cache | ||
| key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/package.json') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-node- | ||
|
|
||
| - name: Install Rust | ||
| run: | | ||
| curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal | ||
| echo "$HOME/.cargo/bin" >> $GITHUB_PATH | ||
|
|
||
| - name: Use Rust nightly | ||
| run: rustup default nightly | ||
| - name: Install root deps | ||
| run: npm ci | ||
|
|
||
| - name: Cache cargo | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: | | ||
| ~/.cargo/registry | ||
| ~/.cargo/git | ||
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-cargo- | ||
|
|
||
| - name: Build iOS (make ios) | ||
| run: | | ||
| set -e | ||
| make ios | ||
|
|
||
| - name: Build and copy iOS XCFramework | ||
| run: | | ||
| set -e | ||
| ./tools/scripts/canvas-build.sh | ||
|
|
||
| - name: Upload iOS platforms | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ios-platforms | ||
| path: packages/canvas/platforms/ios | ||
|
|
||
| publish: | ||
github-advanced-security[bot] marked this conversation as resolved.
Fixed
Show fixed
Hide fixed
|
||
| name: Publish to npm | ||
github-advanced-security[bot] marked this conversation as resolved.
Fixed
Show fixed
Hide fixed
|
||
| runs-on: ubuntu-22.04 | ||
| needs: [ build-linux, build-macos ] | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Download linux artifacts | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: napi-linux-artifacts | ||
| path: ./artifacts/linux | ||
|
|
||
| - name: Cache cargo | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: | | ||
| ~/.cargo/registry | ||
| ~/.cargo/git | ||
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-cargo- | ||
|
|
||
| - name: Download mac artifacts | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: napi-macos-artifacts | ||
| path: ./artifacts/macos | ||
|
|
||
| - name: Setup Node | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 22 | ||
|
|
||
| - name: Install root deps | ||
| run: npm ci | ||
|
|
||
| - name: Compute NPM_VERSION | ||
| run: | | ||
| if [[ "${GITHUB_REF}" == refs/tags/* ]]; then | ||
| TAG=${GITHUB_REF#refs/tags/} | ||
| echo "Detected tag $TAG" | ||
| echo "NPM_VERSION=$TAG" >> $GITHUB_ENV | ||
| # set NPM_TAG to prefix of tag (e.g. rc/, beta) or the tag itself | ||
| echo "NPM_TAG=${TAG%%-*}" >> $GITHUB_ENV | ||
| else | ||
| if [ -n "${{ github.event.inputs.npm_tag }}" ]; then | ||
| NT="${{ github.event.inputs.npm_tag }}" | ||
| else | ||
| NT="$NPM_TAG" | ||
| fi | ||
| echo "NPM_TAG=$NT" >> $GITHUB_ENV | ||
| echo "NPM_VERSION=$(node -e \"console.log(require('./packages/canvas/package.json').version)\")-$NT-$(date +\"%Y%m%d\")-$GITHUB_RUN_ID" >> $GITHUB_ENV | ||
| fi | ||
|
|
||
| - name: Bump packages (no git tags) | ||
| run: | | ||
| for pkg in packages/canvas packages/canvas-babylon packages/canvas-media packages/canvas-phaser packages/canvas-phaser-ce packages/canvas-pixi packages/canvas-polyfill packages/canvas-three packages/canvas-svg; do | ||
| if [ -f "$pkg/package.json" ]; then | ||
| (cd "$pkg" && npm --no-git-tag-version version "$NPM_VERSION") | ||
| fi | ||
| done | ||
|
|
||
| - name: Create project .npmrc (in-repo) | ||
| if: ${{ secrets.NPM_PUBLISH_TOKEN != '' }} | ||
| run: | | ||
| echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_PUBLISH_TOKEN }}" > .npmrc | ||
|
|
||
| - name: Build all packages | ||
| run: | | ||
| npx nx run canvas:build.all | ||
|
|
||
| - name: Publish packages | ||
| if: ${{ github.event.inputs.dry_run != 'true' }} | ||
| env: | ||
| NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} | ||
| run: | | ||
| if [ -z "$NPM_TOKEN" ]; then | ||
| echo "NPM token missing. Set secrets.NPM_PUBLISH_TOKEN to proceed." && exit 1 | ||
| fi | ||
| echo "Publishing packages with version $NPM_VERSION and tag $NPM_TAG" | ||
| npm run publish-packages --name "$NPM_PACKAGES" --verify true --version "$NPM_VERSION" --tag "$NPM_TAG" | ||
|
|
||
| - name: Clean up .npmrc | ||
| if: always() | ||
| run: rm -f .npmrc || true | ||
|
|
||
| - name: Create release tarball | ||
| if: startsWith(github.ref, 'refs/tags/') && github.event.inputs.dry_run != 'true' | ||
| run: | | ||
| set -e | ||
| TAR_NAME=release-${NPM_VERSION}.tar.gz | ||
| tar -czf ${TAR_NAME} dist packages/canvas/platforms || true | ||
| echo "Created ${TAR_NAME}" | ||
|
|
||
| - name: Create GitHub release and upload assets | ||
| if: startsWith(github.ref, 'refs/tags/') && github.event.inputs.dry_run != 'true' | ||
| uses: softprops/action-gh-release@v1 | ||
| with: | ||
| files: release-${NPM_VERSION}.tar.gz | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.