From 26fc7c1be3e76f9c6af4d3fe9df8a032da3b80b4 Mon Sep 17 00:00:00 2001 From: MrSpoocy Date: Wed, 8 May 2024 08:41:19 +0200 Subject: [PATCH 1/7] wip: try workflow --- .github/workflows/artifact.yml | 45 ++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/artifact.yml diff --git a/.github/workflows/artifact.yml b/.github/workflows/artifact.yml new file mode 100644 index 0000000..129400a --- /dev/null +++ b/.github/workflows/artifact.yml @@ -0,0 +1,45 @@ +name: Artifacts-Test + +on: + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v4 + - name: Use Node.js from .nvmrc + uses: actions/setup-node@v4 + with: + node-version: '20.x' + - name: Install dependencies + run: npm ci + - name: Build 🔧 + run: npm run build --if-present + - name: Archive production artifacts 🚀 + uses: actions/upload-artifact@v4 + with: + name: lib + path: lib + check: + name: check build + needs: [build] + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v4 + with: + persist-credentials: false + - name: Setup Node.Js + uses: actions/setup-node@v4 + with: + node-version: '20.x' + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + name: lib + - name: List files + shell: bash + run: | + ls -la / From 3cf8542d205c6677888c2b9ca4aafb1915c8e796 Mon Sep 17 00:00:00 2001 From: MrSpoocy Date: Wed, 8 May 2024 08:46:44 +0200 Subject: [PATCH 2/7] wip: add pull request trigger --- .github/workflows/artifact.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/artifact.yml b/.github/workflows/artifact.yml index 129400a..789ef29 100644 --- a/.github/workflows/artifact.yml +++ b/.github/workflows/artifact.yml @@ -1,6 +1,8 @@ name: Artifacts-Test on: + pull_request: + branches: [ master ] workflow_dispatch: jobs: From a9a1bb888c30cb19b88047e83f5bdc54d42699d8 Mon Sep 17 00:00:00 2001 From: MrSpoocy Date: Wed, 8 May 2024 08:51:38 +0200 Subject: [PATCH 3/7] wip: try relative path --- .github/workflows/artifact.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/artifact.yml b/.github/workflows/artifact.yml index 789ef29..4e170b9 100644 --- a/.github/workflows/artifact.yml +++ b/.github/workflows/artifact.yml @@ -44,4 +44,5 @@ jobs: - name: List files shell: bash run: | - ls -la / + echo We are `pwd` + ls -la ./ From c0aae61602e1f6e6d2315a18ccfbb84d7bd2a50c Mon Sep 17 00:00:00 2001 From: MrSpoocy Date: Wed, 8 May 2024 08:57:43 +0200 Subject: [PATCH 4/7] wip: update path --- .github/workflows/artifact.yml | 8 +++++--- tsconfig.json | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/artifact.yml b/.github/workflows/artifact.yml index 4e170b9..13448b6 100644 --- a/.github/workflows/artifact.yml +++ b/.github/workflows/artifact.yml @@ -22,8 +22,8 @@ jobs: - name: Archive production artifacts 🚀 uses: actions/upload-artifact@v4 with: - name: lib - path: lib + name: dist + path: dist/ check: name: check build needs: [build] @@ -40,9 +40,11 @@ jobs: - name: Download artifacts uses: actions/download-artifact@v4 with: - name: lib + name: dist - name: List files shell: bash run: | echo We are `pwd` ls -la ./ + ls -la ./dist + ls -la ./lib diff --git a/tsconfig.json b/tsconfig.json index 75848c4..a499f26 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "target": "es5", "module": "commonjs", - "outDir": "lib", + "outDir": "dist", "removeComments": false, "preserveConstEnums": true, "types": ["./CEPEngine_extensions", "./window", "@types/node"], From 341d96b873881810717550d58a0c331e7bf1fdbe Mon Sep 17 00:00:00 2001 From: MrSpoocy Date: Wed, 8 May 2024 08:59:51 +0200 Subject: [PATCH 5/7] wip: remove destination path --- .github/workflows/artifact.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/artifact.yml b/.github/workflows/artifact.yml index 13448b6..ff71afd 100644 --- a/.github/workflows/artifact.yml +++ b/.github/workflows/artifact.yml @@ -23,7 +23,6 @@ jobs: uses: actions/upload-artifact@v4 with: name: dist - path: dist/ check: name: check build needs: [build] @@ -47,4 +46,3 @@ jobs: echo We are `pwd` ls -la ./ ls -la ./dist - ls -la ./lib From 2351a520d03eef6ec0d9280f9052827be6c57fb5 Mon Sep 17 00:00:00 2001 From: MrSpoocy Date: Wed, 8 May 2024 09:02:45 +0200 Subject: [PATCH 6/7] wip: add path --- .github/workflows/artifact.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/artifact.yml b/.github/workflows/artifact.yml index ff71afd..a6c05dc 100644 --- a/.github/workflows/artifact.yml +++ b/.github/workflows/artifact.yml @@ -23,6 +23,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: dist + path: dist/ check: name: check build needs: [build] @@ -40,6 +41,7 @@ jobs: uses: actions/download-artifact@v4 with: name: dist + path: dist/ - name: List files shell: bash run: | From a77f96311611b3371a4d52637d9e98a0adefb55a Mon Sep 17 00:00:00 2001 From: MrSpoocy Date: Wed, 8 May 2024 09:19:33 +0200 Subject: [PATCH 7/7] fix(ci): fix build --- .github/workflows/artifact.yml | 50 ---------------------------------- .github/workflows/publish.yml | 7 +++-- package.json | 6 ++-- 3 files changed, 7 insertions(+), 56 deletions(-) delete mode 100644 .github/workflows/artifact.yml diff --git a/.github/workflows/artifact.yml b/.github/workflows/artifact.yml deleted file mode 100644 index a6c05dc..0000000 --- a/.github/workflows/artifact.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Artifacts-Test - -on: - pull_request: - branches: [ master ] - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout Code - uses: actions/checkout@v4 - - name: Use Node.js from .nvmrc - uses: actions/setup-node@v4 - with: - node-version: '20.x' - - name: Install dependencies - run: npm ci - - name: Build 🔧 - run: npm run build --if-present - - name: Archive production artifacts 🚀 - uses: actions/upload-artifact@v4 - with: - name: dist - path: dist/ - check: - name: check build - needs: [build] - runs-on: ubuntu-latest - steps: - - name: Checkout Code - uses: actions/checkout@v4 - with: - persist-credentials: false - - name: Setup Node.Js - uses: actions/setup-node@v4 - with: - node-version: '20.x' - - name: Download artifacts - uses: actions/download-artifact@v4 - with: - name: dist - path: dist/ - - name: List files - shell: bash - run: | - echo We are `pwd` - ls -la ./ - ls -la ./dist diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 503df41..234718b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -29,8 +29,8 @@ jobs: - name: Archive production artifacts 🚀 uses: actions/upload-artifact@v4 with: - name: lib - path: lib + name: dist + path: dist/ release: name: semantic-release needs: [build] @@ -47,7 +47,8 @@ jobs: - name: Download artifacts uses: actions/download-artifact@v4 with: - name: lib + name: dist + path: dist/ - name: Publish package 📦 run: | npm ci diff --git a/package.json b/package.json index df0d187..5298c30 100644 --- a/package.json +++ b/package.json @@ -2,8 +2,8 @@ "name": "@extendscript/csinterface", "version": "1.0.0", "description": "TypeScript version of Adobe CSInterface", - "main": "lib/index.js", - "types": "lib/index.d.ts", + "main": "dist/index.js", + "types": "dist/index.d.ts", "scripts": { "build": "tsc", "test": "echo \"Error: no test specified\" && exit 0" @@ -41,6 +41,6 @@ "typescript": "^5.4.5" }, "files": [ - "lib/**/*" + "dist/**/*" ] }