From c1c934329a99aec98f592eab0f12532b59cc9956 Mon Sep 17 00:00:00 2001 From: M Firhan Azmi Nor Date: Sun, 29 Sep 2024 09:07:48 +0000 Subject: [PATCH] Refactor build workflow to include permissions for reading contents and writing packages, use Node v18, and update registry URL --- .github/workflows/release.yml | 9 ++++----- package-lock.json | 13 +++++++++++++ package.json | 3 +++ 3 files changed, 20 insertions(+), 5 deletions(-) create mode 100644 package-lock.json diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a877e53..d674067 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -67,15 +67,14 @@ jobs: packages: write steps: - uses: actions/checkout@v4 - - name: Setup Node - uses: actions/setup-node@v4 + - uses: actions/setup-node@v4 + with: + node-version: 18 + registry-url: https://npm.pkg.github.com/ - name: Install Utilities run: sudo apt-get install jq moreutils - name: Setup WASM Config run: jq '.wasm_url = "${{vars.CLOUDFRONT_CDN_DOMAIN}}/${{ github.sha }}"' config.json | sponge config.json - - name: Setup Node Config - run: | - echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> ~/.npmrc - name: Install Dependencies run: npm install - run: npm publish diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..e9b6f44 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,13 @@ +{ + "name": "layer8interceptor", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "layer8interceptor", + "version": "0.1.0", + "license": "GPL-2.0" + } + } +} diff --git a/package.json b/package.json index 6a84c3d..83e8a7b 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,9 @@ "name": "layer8interceptor", "version": "0.1.0", "type": "module", + "publishConfig": { + "registry": "https://npm.pkg.github.com" + }, "description": "This package allows Layer8 clients to connect to the remote Layer8 Server. It povides the 1) stock WASM glue code 2) binary of the Interceptor, and 3) the index.js necessary to run it. ", "main": "index.js", "types": "index.d.ts",