Skip to content

Commit

Permalink
add ci
Browse files Browse the repository at this point in the history
  • Loading branch information
LeXXik committed May 1, 2024
1 parent 348e38a commit b8a2b67
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 3 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: CI

on:
workflow_dispatch:
push:
branches: [ master ]
pull_request:
branches: [ master ]

concurrency:
group: ci-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js 16.x
uses: actions/setup-node@v4
with:
node-version: 16.x
cache: 'npm'

- name: Install dependencies
run: npm clean-install --progress=false --no-fund

- name: Build Physics
run: npm run build
1 change: 0 additions & 1 deletion .github/workflows/release-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:

jobs:
publish-gpr:
needs: build
runs-on: ubuntu-latest
steps:
- name: Check out code
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"license": "MIT",
"type": "module",
"scripts": {
"build": "rimraf dist && rollup -c && rollup -c --config_dev",
"build:dev": "rimraf dist && rollup -c --config_dev",
"build:prod": "rimraf dist && rollup -c"
},
Expand Down
4 changes: 2 additions & 2 deletions rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const jscOptsDev = {

export default args => {
const isDev = args.config_dev;

const file = isDev ? 'dist/physics.dbg.mjs' : 'dist/physics.min.mjs';
const plugins = [nodeResolve()];

if (isDev) {
Expand All @@ -58,7 +58,7 @@ export default args => {
return {
input: 'src/index.mjs',
output: {
file: 'dist/physics.mjs',
file,
format: 'es',
sourcemap: isDev ? 'inline' : false
},
Expand Down

0 comments on commit b8a2b67

Please sign in to comment.