diff --git a/.github/actions/init-npm/action.yml b/.github/actions/init-npm/action.yml index 2cb6609f..34c29e41 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/workflows/codeql.yml b/.github/workflows/codeql.yml index bf6ec8a6..9c0c344e 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" diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml index 2df422fa..41198bab 100644 --- a/.github/workflows/core.yml +++ b/.github/workflows/core.yml @@ -1,7 +1,8 @@ name: Core on: - - push - - pull_request + push: + branches: [master] + pull_request: {} jobs: test: @@ -10,19 +11,21 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + - name: NPM Init uses: ./.github/actions/init-npm - with: - node-version: 18 - gh-token: ${{ secrets.GITHUB_TOKEN }} + - name: Sync pkg run: npm run sync + - name: Build demo run: npm run build:demo + - name: Test run: npm run test env: CI: 'true' + - name: Upload coverage if: ${{ runner.os != 'windows-latest' }} continue-on-error: true @@ -31,8 +34,15 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} flag-name: node-${{ inputs.node-version }}-on-${{ runner.os }}-${{ github.event_name }} path-to-lcov: ./coverage/ngforage/lcov.info + - name: Test making docs run: npm run compodoc + + - name: Release dry run + run: npm run release -- --dry-run + env: + GITHUB_TOKEN: ${{ github.token }} + release: name: Release runs-on: ubuntu-latest @@ -44,26 +54,30 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 1000 + persist-credentials: false + - name: Init NPM uses: ./.github/actions/init-npm - with: - node-version: 18 - gh-token: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/setup-node@v3 name: Reconfig Node with: - node-version: 18 + node-version: 20 registry-url: https://registry.npmjs.org + - name: Build demo site run: npm run build:demo:prod + - name: Build docs run: npm run compodoc + - 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 }} + - name: Release github pages uses: JamesIves/github-pages-deploy-action@v4.4.3 with: diff --git a/package-lock.json b/package-lock.json index 20b34ed9..93f4dbad 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "10.0.0", "license": "MIT", "devDependencies": { - "@alorel-personal/conventional-changelog-alorel": "2.1.3", + "@alorel-personal/conventional-changelog-alorel": "3.0.0", "@angular-devkit/build-angular": "^16.1.5", "@angular/cli": "^16.1.5", "@angular/common": "^16.1.6", @@ -70,14 +70,14 @@ "dev": true }, "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": { @@ -3682,18 +3682,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", @@ -4138,18 +4126,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", @@ -6259,16 +6235,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": { @@ -16696,16 +16671,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", @@ -20828,14 +20793,14 @@ "dev": true }, "@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": { @@ -23270,17 +23235,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": { @@ -23572,15 +23526,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", @@ -25291,13 +25236,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": { @@ -32844,12 +32788,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 4d4c6aac..e169d3db 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "tslib": "^2.4.0" }, "devDependencies": { - "@alorel-personal/conventional-changelog-alorel": "2.1.3", + "@alorel-personal/conventional-changelog-alorel": "3.0.0", "@angular-devkit/build-angular": "^16.1.5", "@angular/cli": "^16.1.5", "@angular/common": "^16.1.6",