diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 90d0f6b..4c76cf0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,31 +6,14 @@ jobs: build: runs-on: [ubuntu-latest] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: actions/setup-node@v1 + - uses: actions/setup-node@v4 with: - node-version: 16 - - name: Cache .npm - id: npm-cache - uses: actions/cache@v2 - with: - path: | - ~/.npm - key: ${{ runner.os }}-npm-module-cache-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-npm-module-cache- - - name: Cache node_modules and .cache - id: node-modules-cache - uses: actions/cache@v2 - with: - path: | - ./node_modules - ~/.cache - key: ${{ runner.os }}-${{ github.ref }}-${{ hashFiles('**/package-lock.json') }} + node-version: 20 + cache: 'npm' - name: Install dependencies - if: steps.node-modules-cache.outputs.cache-hit != 'true' - run: npm install + run: npm ci - name: Build library run: npm run build diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 7b5a226..e2b692b 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -6,31 +6,14 @@ jobs: lint: runs-on: [ubuntu-latest] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 0 - uses: actions/setup-node@v1 with: - node-version: 16 - - name: Cache .npm - id: npm-cache - uses: actions/cache@v2 - with: - path: | - ~/.npm - key: ${{ runner.os }}-npm-module-cache-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-npm-module-cache- - - name: Cache node_modules and .cache - id: node-modules-cache - uses: actions/cache@v2 - with: - path: | - ./node_modules - ~/.cache - key: ${{ runner.os }}-${{ github.ref }}-${{ hashFiles('**/package-lock.json') }} + node-version: 20 + cache: 'npm' - name: Install dependencies - if: steps.node-modules-cache.outputs.cache-hit != 'true' - run: npm install + run: npm ci - name: Lint workspace run: npm run lint diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..448f265 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,22 @@ +name: Publish +on: + push: + tags: + - v* + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + registry-url: 'https://registry.npmjs.org' + cache: 'npm' + + - run: npm ci + - run: npm run build + - run: npm publish --provenance --access public dist/packages/ngx-clarity/ + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f3c22ee..db4051a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,31 +6,14 @@ jobs: test: runs-on: [ubuntu-latest] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: actions/setup-node@v1 + - uses: actions/setup-node@v4 with: - node-version: 16 - - name: Cache .npm - id: npm-cache - uses: actions/cache@v2 - with: - path: | - ~/.npm - key: ${{ runner.os }}-npm-module-cache-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-npm-module-cache- - - name: Cache node_modules and .cache - id: node-modules-cache - uses: actions/cache@v2 - with: - path: | - ./node_modules - ~/.cache - key: ${{ runner.os }}-${{ github.ref }}-${{ hashFiles('**/package-lock.json') }} + node-version: 20 + cache: 'npm' - name: Install dependencies - if: steps.node-modules-cache.outputs.cache-hit != 'true' - run: npm install + run: npm ci - name: Run tests run: npm run test diff --git a/package.json b/package.json index 313dd32..c9a6631 100644 --- a/package.json +++ b/package.json @@ -62,5 +62,6 @@ "rxjs": "7.8.1", "tslib": "^2.0.0", "zone.js": "0.13.1" - } + }, + "packageManager": "npm@10.8.1+sha512.0e9d42e92bd2318408ed81eaff2da5f78baf23ee7d12a6eed44a6e2901d0f29d7ab715d1b918ade601f72e769a824d9a5c322383f22bbbda5dd396e79de2a077" } diff --git a/packages/ngx-clarity/package.json b/packages/ngx-clarity/package.json index 8b8b6a1..7e3ade7 100644 --- a/packages/ngx-clarity/package.json +++ b/packages/ngx-clarity/package.json @@ -1,6 +1,6 @@ { "name": "ngx-clarity", - "version": "2.1.0", + "version": "2.2.0", "description": "Angular module to add the tracking code for microsoft.clarity.com", "publishConfig": { "access": "public" @@ -25,11 +25,11 @@ ], "author": { "name": "John Dengis", - "email": "jadengis@gmail.com" + "email": "john@deng.is" }, "peerDependencies": { - "@angular/common": ">=15 <18", - "@angular/core": ">=15 <18" + "@angular/common": ">=15 <19", + "@angular/core": ">=15 <19" }, "dependencies": { "tslib": "^2.3.0"