From 60937da636c63db7a20ecccce3bbc8da5a9b241f Mon Sep 17 00:00:00 2001 From: ctw-joao-luis Date: Thu, 10 Oct 2024 09:56:22 +0100 Subject: [PATCH 1/4] CI pipeline added --- .github/workflows/CI.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/CI.yml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 00000000..17a9a58f --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,31 @@ +name: CI + +on: + push: + branches: [main] + tags: ["v*"] + pull_request: + branches: ["*"] + +jobs: + push: + name: push + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 18.x + registry-url: https://registry.npmjs.org + cache: yarn + + - run: yarn install --frozen-lockfile + - run: yarn run build + - run: yarn run test + + - name: Publish to NPM + if: ${{ startsWith(github.ref, 'refs/tags/v') }} + run: yarn publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} \ No newline at end of file From 4ae18d03421fb5e067d3b13159eca1b30f8b58cc Mon Sep 17 00:00:00 2001 From: ctw-joao-luis Date: Thu, 10 Oct 2024 10:16:09 +0100 Subject: [PATCH 2/4] Change on package.json scripts to test the project --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 82ac8fb1..a44a1a68 100644 --- a/package.json +++ b/package.json @@ -8,12 +8,12 @@ "sideEffects": false, "scripts": { "prepack": "npm run build", - "build": "rollup -c", + "build": "rollup -c && npm run fmt", "test:unit": "karma start", "test:node": "mocha ./tests/node/main.mjs", "test:types": "tsc -p ./tests/tsconfig.json", "test:types:watch": "npm run test:types -- --watch", - "test": "npm run fmt_test && npm run build && npm run test:types && npm run test:unit && npm run test:node", + "test": "npm run fmt_test && npm run test:types && npm run test:unit && npm run test:node", "fmt": "prettier --write './*.{mjs,js,ts,md,json,html}' './{src,docs,tests}/{,**/}*.{mjs,js,ts,md,json,html}'", "fmt_test": "test $(prettier -l './*.{mjs,js,ts,md,json,html}' './{src,docs,tests}/{**/,}*.{mjs,js,ts,md,json,html}' | wc -l) -eq 0", "watchtest": "CHROME_ONLY=1 karma start --no-single-run" From 761e8157b6e53cfdaca1a6f7cd61f090624c2ea4 Mon Sep 17 00:00:00 2001 From: ctw-joao-luis Date: Thu, 10 Oct 2024 10:31:51 +0100 Subject: [PATCH 3/4] Metadata changes for the repository --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index a44a1a68..1a0035bb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "comlink", - "version": "4.4.2", + "version": "1.0.0", "description": "Comlink makes WebWorkers enjoyable", "main": "dist/umd/comlink.js", "module": "dist/esm/comlink.mjs", @@ -19,8 +19,8 @@ "watchtest": "CHROME_ONLY=1 karma start --no-single-run" }, "author": { - "name": "Surma", - "email": "surma@google.com" + "name": "Lichtblick", + "email": "lichtblick@bmwgroup.com" }, "files": [ "dist" From cb1240af2ba84b27eb82e0fb0a3e9347f9d1d58a Mon Sep 17 00:00:00 2001 From: ctw-joao-luis Date: Thu, 10 Oct 2024 11:38:12 +0100 Subject: [PATCH 4/4] fix on the pipeline so the publish step is triggered as is intended --- .github/workflows/CI.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 17a9a58f..f875408d 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -2,10 +2,10 @@ name: CI on: push: - branches: [main] - tags: ["v*"] + branches: main + tags: "v*" pull_request: - branches: ["*"] + branches: "*" jobs: push: