-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
42 changed files
with
20,855 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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,31 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"es6": true, | ||
"node": true | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:react/recommended", | ||
"plugin:@typescript-eslint/recommended" | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaFeatures": { | ||
"jsx": true | ||
}, | ||
"ecmaVersion": "latest", | ||
"sourceType": "module" | ||
}, | ||
"plugins": ["react", "@typescript-eslint"], | ||
"rules": { | ||
"react/react-in-jsx-scope": "off", | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"@typescript-eslint/no-non-null-assertion": "off" | ||
}, | ||
"globals": { | ||
"chrome": "readonly" | ||
}, | ||
"ignorePatterns": ["watch.js", "dist/**"] | ||
} | ||
|
This file contains 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,5 @@ | ||
*.js text eol=lf | ||
*.json text eol=lf | ||
*.yml text eol=lf | ||
*.md text eol=lf | ||
*.txt text eol=lf |
This file contains 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 @@ | ||
open_collective: pixijs |
This file contains 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,87 @@ | ||
name: Automation | ||
on: | ||
push: | ||
branches: [ '**' ] | ||
release: | ||
types: [ published ] | ||
pull_request: | ||
branches: [ '**' ] | ||
jobs: | ||
build: | ||
name: Build | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN || '' }} | ||
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID || '' }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
AWS_REGION: ${{ secrets.AWS_REGION }} | ||
SOURCE_DIR: 'deploy' | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install xvfb | ||
run: sudo apt-get install xvfb | ||
- name: Use Node.js 18.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
- name: Install Dependencies | ||
run: npm ci | ||
|
||
- name: Build for Distribution | ||
run: xvfb-run --auto-servernum npm run dist | ||
|
||
# All the below are deploy-related steps | ||
- name: Extract Branch Name | ||
id: branch_name | ||
if: github.event_name == 'push' && !contains(github.ref, 'refs/tags') | ||
run: echo BRANCH_NAME=${GITHUB_REF/refs\/heads\//} >> $GITHUB_OUTPUT | ||
|
||
# Examples: | ||
# 1) PR feature/acme merged into dev | ||
# 2) branch A merged into branch B | ||
# 3) branch A pushed directly to git | ||
- name: Deploy Non-Tag Branches | ||
uses: jakejarvis/s3-sync-action@master | ||
if: github.event_name == 'push' && env.AWS_ACCESS_KEY_ID != '' | ||
with: | ||
args: --acl public-read --follow-symlinks --delete --cache-control "max-age=60" | ||
env: | ||
DEST_DIR: ${{ steps.branch_name.outputs.BRANCH_NAME }} | ||
|
||
# Release is published and deployed into s3://bucket-name/v5.22/ | ||
- name: Deploy Released Branches | ||
uses: jakejarvis/s3-sync-action@master | ||
if: github.event_name == 'release' && env.AWS_ACCESS_KEY_ID != '' | ||
with: | ||
args: --acl public-read --follow-symlinks --delete --cache-control "max-age=2592000" | ||
env: | ||
DEST_DIR: ${{ github.event.release.tag_name }} | ||
|
||
# Same release from previous deployed into s3://bucket-name/release/ | ||
- name: Deploy Latest Release | ||
uses: jakejarvis/s3-sync-action@master | ||
if: github.event_name == 'release' && github.event.release.prerelease == false && env.AWS_ACCESS_KEY_ID != '' | ||
with: | ||
args: --acl public-read --follow-symlinks --delete --cache-control "max-age=1209600" | ||
env: | ||
DEST_DIR: 'latest' | ||
|
||
# Publish to NPM | ||
- name: Publish Latest Release | ||
if: github.event_name == 'release' && github.event.release.prerelease == false && env.NODE_AUTH_TOKEN != '' | ||
run: npm run publish-ci | ||
|
||
# Publish to NPM with prerelease dist-tag | ||
- name: Publish Latest Prerelease | ||
if: github.event_name == 'release' && github.event.release.prerelease && env.NODE_AUTH_TOKEN != '' | ||
run: npm run publish-ci | ||
env: | ||
XS_PUBLISH_TAG: prerelease | ||
|
||
# Automatically attach browser files to release | ||
- name: Upload to Release | ||
if: github.event_name == 'release' | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: dist/* |
Oops, something went wrong.