ci: add paperjs build workflow

This commit is contained in:
Ron de las Alas 2023-10-26 13:45:25 -04:00
parent df67b079f7
commit 597c18c04a
7 changed files with 1215 additions and 383 deletions

55
.github/workflows/deploy.yml vendored Normal file
View file

@ -0,0 +1,55 @@
on:
push: # Runs whenever a commit is pushed to the repository...
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
permissions:
contents: write
jobs:
build-deploy:
runs-on: ubuntu-latest
env:
JVM_OPTS: -Xmx3200m
JDK_JAVA_OPTIONS: --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED --add-exports java.base/sun.nio.ch=ALL-UNNAMED
steps:
- uses: actions/checkout@v4
- uses: wagoid/commitlint-github-action@v5
- name: Setup Java
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: 17
- name: Setup submodule
run: git submodule update --init --recursive
- uses: actions/setup-node@v2
with:
cache: "npm"
node-version-file: ".nvmrc"
- name: Info
run: |
cat <<EOF
Node version: $(node --version)
NPM version: $(npm --version)
GitHub ref: ${{ github.ref }}
GitHub head ref: ${{ github.head_ref }}
EOF
- name: Setup
run: |
# sudo apt update
# sudo apt install libgif-dev
TRAVIS_BRANCH="${{github.ref_name}}" travis/setup-git.sh # Configure git user info
travis/install-assets.sh
npm set progress=false
which gulp || npm install -g gulp-cli
- name: Install NPM Dependencies
run: |
npm ci --legacy-peer-deps
- run: gulp jshint
- run: gulp minify
- run: gulp test
- run: gulp zip
- name: Tag build
run: |
TRAVIS_TAG="${{github.ref_name}}" TRAVIS_COMMIT="${{github.sha}}" travis/deploy-prebuilt.sh

3
.gitignore vendored
View file

@ -1,2 +1,5 @@
node_modules/
dist/*
gulp/typescript/typescript-definition-test.js

View file

@ -1,9 +1,11 @@
{
"compilerOptions": {
"target": "ES5",
"strictNullChecks": true
"strictNullChecks": false
},
"files" : [
"typescript-definition-test.ts"
]
],
"exclude": [
"node_modules"]
}

View file

@ -389,7 +389,7 @@ item.hitTestAll(point);
item.hitTestAll(point, {});
item.matches({});
item.matches(callback);
item.matches(name, {});
item.matches(item.name, {});
item.getItems({});
item.getItems(callback);
item.getItem({});

1490
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -9,7 +9,10 @@
"url": "https://github.com/paperjs/paper.js"
},
"bugs": "https://github.com/paperjs/paper.js/issues",
"contributors": ["Jürg Lehni <juerg@scratchdisk.com> (http://scratchdisk.com)", "Jonathan Puckey <jonathan@puckey.studio> (http://studiomoniker.com)"],
"contributors": [
"Jürg Lehni <juerg@scratchdisk.com> (http://scratchdisk.com)",
"Jonathan Puckey <jonathan@puckey.studio> (http://studiomoniker.com)"
],
"main": "dist/paper-full.js",
"types": "dist/paper.d.ts",
"scripts": {
@ -21,7 +24,14 @@
"jshint": "gulp jshint",
"test": "gulp test"
},
"files": ["AUTHORS.md", "CHANGELOG.md", "dist/", "examples/", "LICENSE.txt", "README.md"],
"files": [
"AUTHORS.md",
"CHANGELOG.md",
"dist/",
"examples/",
"LICENSE.txt",
"README.md"
],
"engines": {
"node": ">=8.0.0"
},
@ -31,6 +41,9 @@
"pre-push": "gulp test --ensure-branch develop"
}
},
"overrides": {
"graceful-fs": "^4.2.11"
},
"browser": {
"canvas": false,
"jsdom": false,
@ -51,7 +64,8 @@
"gulp-prepro": "^2.4.0",
"gulp-qunits": "^2.1.2",
"gulp-rename": "^1.4.0",
"gulp-shell": "^0.7.0",
"gulp-typescript": "^5.0.0",
"gulp-shell": "^0.8.0",
"gulp-symlink": "^2.1.4",
"gulp-uglify": "^1.5.4",
"gulp-uncomment": "^0.3.0",
@ -74,7 +88,23 @@
"source-map-support": "^0.5.12",
"stats.js": "0.17.0",
"straps": "^3.0.1",
"typescript": "^3.1.6"
"typescript": "^4.8.2"
},
"keywords": ["vector", "graphic", "graphics", "2d", "geometry", "bezier", "curve", "curves", "path", "paths", "canvas", "svg", "paper", "paper.js", "paperjs"]
"keywords": [
"vector",
"graphic",
"graphics",
"2d",
"geometry",
"bezier",
"curve",
"curves",
"path",
"paths",
"canvas",
"svg",
"paper",
"paper.js",
"paperjs"
]
}

View file

@ -26,7 +26,7 @@ echo "https://${GH_TOKEN}:@github.com" > .git/credentials
# fetch = +refs/heads/*:refs/remotes/origin/*
# We can change the fetch setting by removing and adding the origin again:
git remote remove origin
git remote add origin https://github.com/paperjs/paper.js.git
git remote add origin https://github.com/scratchfoundation/paper.js.git
# Avoid detached head...
git checkout $TRAVIS_BRANCH