From 3333b5c11276549ea7625976772bd715d3108e3f Mon Sep 17 00:00:00 2001 From: Christophe Grandpierre Date: Mon, 17 Jun 2024 19:32:24 +0200 Subject: [PATCH] revamp npm publish & fix CHANGELOG items --- .github/workflows/npm-publish.yml | 31 ++++++++----------------------- CHANGELOG.md | 18 ++++++++++++------ package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 23 insertions(+), 32 deletions(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 8c3717d..3f43fbe 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -1,36 +1,21 @@ -# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created -# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages - -name: Node.js Package - +name: Publish Package to npmjs on: release: - types: [created] - + types: [published] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-node@v3 + # Setup .npmrc file to publish to npm + - uses: actions/setup-node@v4 with: - node-version: 20 + node-version: "20.x" + registry-url: "https://registry.npmjs.org" - run: npm ci - run: npm run test:unit - run: npm run prettier:check - run: INTEGRATION_TEST_TIMEOUT=30000 npm run test:integration - - run: npm run build - - publish-npm: - needs: build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v3 - with: - node-version: 20 - registry-url: https://registry.npmjs.org/ - - run: npm ci - - run: npm publish + - run: npm publish --access public env: - NODE_AUTH_TOKEN: ${{secrets.SMARTESTING_NPM_TOKEN}} + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d03fa3..e3841f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,37 +5,43 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [0.1.5](https://github.com/Smartesting/gravity-data-collector/compare/v0.1.4...v0.1.5) +## [0.1.6](https://github.com/Smartesting/gravity-cypress-plugin/compare/v0.1.5...v0.1.6) + +### Info + +- NPM packaging + +## [0.1.5](https://github.com/Smartesting/gravity-cypress-plugin/compare/v0.1.4...v0.1.5) ### Info - convenient version update -## [0.1.4](https://github.com/Smartesting/gravity-data-collector/compare/v0.1.3...v0.1.4) +## [0.1.4](https://github.com/Smartesting/gravity-cypress-plugin/compare/v0.1.3...v0.1.4) ### Fixed - fix `/dist` presence in NPM package ? -## [0.1.3](https://github.com/Smartesting/gravity-data-collector/compare/v0.1.2...v0.1.3) +## [0.1.3](https://github.com/Smartesting/gravity-cypress-plugin/compare/v0.1.2...v0.1.3) ### Info - use Gravity data collector allowing to pass `window` to video recorder -## [0.1.2](https://github.com/Smartesting/gravity-data-collector/compare/v0.1.1...v0.1.2) +## [0.1.2](https://github.com/Smartesting/gravity-cypress-plugin/compare/v0.1.1...v0.1.2) ### Fixed - Deployment workflow to npmjs: mark project as public -## [0.1.1](https://github.com/Smartesting/gravity-data-collector/compare/v0.1.0...v0.1.1) +## [0.1.1](https://github.com/Smartesting/gravity-cypress-plugin/compare/v0.1.0...v0.1.1) ### Fixed - Deployment workflow to npmjs -## [0.1.0](https://github.com/Smartesting/gravity-data-collector/compare/bae154a25f8e8fd5c3f5bb893c81a52c6c7b3c18...v0.1.0) +## [0.1.0](https://github.com/Smartesting/gravity-cypress-plugin/compare/bae154a25f8e8fd5c3f5bb893c81a52c6c7b3c18...v0.1.0) ### Added diff --git a/package-lock.json b/package-lock.json index 04f01e3..9a8acbf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@smartesting/gravity-cypress-plugin", - "version": "0.1.5", + "version": "0.1.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@smartesting/gravity-cypress-plugin", - "version": "0.1.5", + "version": "0.1.6", "dependencies": { "@smartesting/gravity-data-collector": "^7.0.0", "cross-fetch": "^4.0.0", diff --git a/package.json b/package.json index 7109873..5c784a9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@smartesting/gravity-cypress-plugin", - "version": "0.1.5", + "version": "0.1.6", "main": "dist/index.js", "types": "dist/index.d.ts", "private": false,