From 322b0636e7fefee64c154684d2d61777158686bb Mon Sep 17 00:00:00 2001 From: Art <4998038+Alorel@users.noreply.github.com> Date: Tue, 10 Oct 2023 11:01:57 +0100 Subject: [PATCH] chore: Update release notes generator --- .github/actions/init-npm/action.yml | 2 + .github/actions/test/action.yml | 20 ------ .github/workflows/codeql.yml | 7 +- .github/workflows/core.yml | 44 ++++++++---- package-lock.json | 106 ++++++---------------------- package.json | 3 +- 6 files changed, 58 insertions(+), 124 deletions(-) delete mode 100644 .github/actions/test/action.yml diff --git a/.github/actions/init-npm/action.yml b/.github/actions/init-npm/action.yml index c826061..6f5b5db 100644 --- a/.github/actions/init-npm/action.yml +++ b/.github/actions/init-npm/action.yml @@ -2,9 +2,11 @@ inputs: node-version: description: Node version required: true + default: '20' gh-token: description: GH token required: true + default: ${{ github.token }} name: Set up npm description: Set up npm and install dependencies runs: diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml deleted file mode 100644 index e1a43e3..0000000 --- a/.github/actions/test/action.yml +++ /dev/null @@ -1,20 +0,0 @@ -inputs: - node-version: - description: Node version - required: true - gh-token: - description: GH token - required: true -name: Test -description: Run tests -runs: - using: composite - steps: - - name: NPM Init - uses: ./.github/actions/init-npm - with: - node-version: ${{ inputs.node-version }} - gh-token: ${{ inputs.gh-token }} - - name: Test - run: npm run test - shell: bash diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 63f9648..9c0c344 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -2,9 +2,8 @@ name: "CodeQL" on: push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] + branches: [master] + pull_request: {} schedule: - cron: "39 15 * * 4" @@ -24,7 +23,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Initialize CodeQL uses: github/codeql-action/init@v2 diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml index 898dc42..003b4fd 100644 --- a/.github/workflows/core.yml +++ b/.github/workflows/core.yml @@ -1,28 +1,42 @@ name: Core on: - - push - - pull_request + push: + branches: [master] + pull_request: {} jobs: test: runs-on: ubuntu-latest - name: Test ubuntu-latest/Node 18 + name: Test + permissions: + contents: write + issues: write + pull-requests: write + id-token: write steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 + + - name: NPM Init + uses: ./.github/actions/init-npm + - name: Test - uses: ./.github/actions/test - with: - node-version: 20 - gh-token: ${{ secrets.GITHUB_TOKEN }} + run: npm test + + - name: Release dry run + run: npm run release:dry + env: + GITHUB_TOKEN: ${{ github.token }} + - name: Upload coverage if: ${{ runner.os != 'windows-latest' }} continue-on-error: true - uses: coverallsapp/github-action@v2.2.0 + uses: coverallsapp/github-action@v2.2.3 with: github-token: ${{ secrets.GITHUB_TOKEN }} flag-name: node-${{ inputs.node-version }}-on-${{ runner.os }}-${{ github.event_name }} path-to-lcov: ./coverage/ngx-sails/lcov.info + release: name: Release runs-on: ubuntu-latest @@ -31,22 +45,22 @@ jobs: - test steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 1000 + persist-credentials: false + - name: Init NPM uses: ./.github/actions/init-npm - with: - node-version: 20 - gh-token: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/setup-node@v3 name: Reconfig Node with: - node-version: 20 registry-url: https://registry.npmjs.org + - name: Release run: npm run release env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/package-lock.json b/package-lock.json index 151ed05..ec236ea 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,7 @@ "zone.js": "~0.13.3" }, "devDependencies": { - "@alorel-personal/conventional-changelog-alorel": "^2.1.3", + "@alorel-personal/conventional-changelog-alorel": "^3.0.0", "@angular-builders/custom-webpack": "^16.0.1", "@angular-devkit/build-angular": "^16.2.5", "@angular/cli": "^16.2.5", @@ -49,14 +49,14 @@ } }, "node_modules/@alorel-personal/conventional-changelog-alorel": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@alorel-personal/conventional-changelog-alorel/-/conventional-changelog-alorel-2.1.3.tgz", - "integrity": "sha512-ZXBf4YC2O5sfX26CR84e9z0EYMMIMy3wNwKrZO5Q6bXIwqIwojK6CISnKa2e27FdqLJ2MlK8DAPfMNpg6isZ7A==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@alorel-personal/conventional-changelog-alorel/-/conventional-changelog-alorel-3.0.0.tgz", + "integrity": "sha512-xkkXNSC2DRYCYkqY0uZ74HJON82Fdg4LMzJkPRkLVSS3hyO26wB2HTqFynEp1TKVd/+rXlwkBGZbRwy8BGBkbw==", "dev": true, "dependencies": { - "conventional-changelog-angular": "^5.0.6", - "json5": "^2.1.3", - "lodash": "^4.17.15" + "conventional-changelog-angular": "^7.0.0", + "json5": "^2.2.3", + "lodash": "^4.17.21" } }, "node_modules/@ampproject/remapping": { @@ -3948,18 +3948,6 @@ "semantic-release": ">=20.1.0" } }, - "node_modules/@semantic-release/commit-analyzer/node_modules/conventional-changelog-angular": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-7.0.0.tgz", - "integrity": "sha512-ROjNchA9LgfNMTTFSIWPzebCwOGFdgkEq45EnvvrmSLvCtAw0HSmrCs7/ty+wAeYUZyNay0YMUNYFTRL72PkBQ==", - "dev": true, - "dependencies": { - "compare-func": "^2.0.0" - }, - "engines": { - "node": ">=16" - } - }, "node_modules/@semantic-release/error": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@semantic-release/error/-/error-3.0.0.tgz", @@ -4392,18 +4380,6 @@ "semantic-release": ">=20.1.0" } }, - "node_modules/@semantic-release/release-notes-generator/node_modules/conventional-changelog-angular": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-7.0.0.tgz", - "integrity": "sha512-ROjNchA9LgfNMTTFSIWPzebCwOGFdgkEq45EnvvrmSLvCtAw0HSmrCs7/ty+wAeYUZyNay0YMUNYFTRL72PkBQ==", - "dev": true, - "dependencies": { - "compare-func": "^2.0.0" - }, - "engines": { - "node": ">=16" - } - }, "node_modules/@semantic-release/release-notes-generator/node_modules/get-stream": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-7.0.1.tgz", @@ -6560,16 +6536,15 @@ } }, "node_modules/conventional-changelog-angular": { - "version": "5.0.13", - "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-5.0.13.tgz", - "integrity": "sha512-i/gipMxs7s8L/QeuavPF2hLnJgH6pEZAttySB6aiQLWcX3puWDL3ACVmvBhJGxnAy52Qc15ua26BufY6KpmrVA==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-7.0.0.tgz", + "integrity": "sha512-ROjNchA9LgfNMTTFSIWPzebCwOGFdgkEq45EnvvrmSLvCtAw0HSmrCs7/ty+wAeYUZyNay0YMUNYFTRL72PkBQ==", "dev": true, "dependencies": { - "compare-func": "^2.0.0", - "q": "^1.5.1" + "compare-func": "^2.0.0" }, "engines": { - "node": ">=10" + "node": ">=16" } }, "node_modules/conventional-changelog-writer": { @@ -17487,16 +17462,6 @@ "node": ">=6" } }, - "node_modules/q": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", - "integrity": "sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==", - "dev": true, - "engines": { - "node": ">=0.6.0", - "teleport": ">=0.2.0" - } - }, "node_modules/qjobs": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/qjobs/-/qjobs-1.2.0.tgz", @@ -21354,14 +21319,14 @@ }, "dependencies": { "@alorel-personal/conventional-changelog-alorel": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@alorel-personal/conventional-changelog-alorel/-/conventional-changelog-alorel-2.1.3.tgz", - "integrity": "sha512-ZXBf4YC2O5sfX26CR84e9z0EYMMIMy3wNwKrZO5Q6bXIwqIwojK6CISnKa2e27FdqLJ2MlK8DAPfMNpg6isZ7A==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@alorel-personal/conventional-changelog-alorel/-/conventional-changelog-alorel-3.0.0.tgz", + "integrity": "sha512-xkkXNSC2DRYCYkqY0uZ74HJON82Fdg4LMzJkPRkLVSS3hyO26wB2HTqFynEp1TKVd/+rXlwkBGZbRwy8BGBkbw==", "dev": true, "requires": { - "conventional-changelog-angular": "^5.0.6", - "json5": "^2.1.3", - "lodash": "^4.17.15" + "conventional-changelog-angular": "^7.0.0", + "json5": "^2.2.3", + "lodash": "^4.17.21" } }, "@ampproject/remapping": { @@ -24035,17 +24000,6 @@ "import-from": "^4.0.0", "lodash-es": "^4.17.21", "micromatch": "^4.0.2" - }, - "dependencies": { - "conventional-changelog-angular": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-7.0.0.tgz", - "integrity": "sha512-ROjNchA9LgfNMTTFSIWPzebCwOGFdgkEq45EnvvrmSLvCtAw0HSmrCs7/ty+wAeYUZyNay0YMUNYFTRL72PkBQ==", - "dev": true, - "requires": { - "compare-func": "^2.0.0" - } - } } }, "@semantic-release/error": { @@ -24331,15 +24285,6 @@ "read-pkg-up": "^10.0.0" }, "dependencies": { - "conventional-changelog-angular": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-7.0.0.tgz", - "integrity": "sha512-ROjNchA9LgfNMTTFSIWPzebCwOGFdgkEq45EnvvrmSLvCtAw0HSmrCs7/ty+wAeYUZyNay0YMUNYFTRL72PkBQ==", - "dev": true, - "requires": { - "compare-func": "^2.0.0" - } - }, "get-stream": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-7.0.1.tgz", @@ -26080,13 +26025,12 @@ "dev": true }, "conventional-changelog-angular": { - "version": "5.0.13", - "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-5.0.13.tgz", - "integrity": "sha512-i/gipMxs7s8L/QeuavPF2hLnJgH6pEZAttySB6aiQLWcX3puWDL3ACVmvBhJGxnAy52Qc15ua26BufY6KpmrVA==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-7.0.0.tgz", + "integrity": "sha512-ROjNchA9LgfNMTTFSIWPzebCwOGFdgkEq45EnvvrmSLvCtAw0HSmrCs7/ty+wAeYUZyNay0YMUNYFTRL72PkBQ==", "dev": true, "requires": { - "compare-func": "^2.0.0", - "q": "^1.5.1" + "compare-func": "^2.0.0" } }, "conventional-changelog-writer": { @@ -33907,12 +33851,6 @@ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true }, - "q": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", - "integrity": "sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==", - "dev": true - }, "qjobs": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/qjobs/-/qjobs-1.2.0.tgz", diff --git a/package.json b/package.json index 91648f9..55cc56c 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "build": "ng build ngx-sails", "watch": "npm --scripts-prepend-node-path=auth run build -- --watch", "release": "semantic-release", + "release:dry": "semantic-release --dry-run", "test": "node --no-deprecation ./node_modules/.bin/ng test ngx-sails --progress --code-coverage", "test:watch": "npm --scripts-prepend-node-path=auth run test -- --watch" }, @@ -45,7 +46,7 @@ "zone.js": "~0.13.3" }, "devDependencies": { - "@alorel-personal/conventional-changelog-alorel": "^2.1.3", + "@alorel-personal/conventional-changelog-alorel": "^3.0.0", "@angular-builders/custom-webpack": "^16.0.1", "@angular-devkit/build-angular": "^16.2.5", "@angular/cli": "^16.2.5",