diff --git a/.github/workflows/push-workflows.yml b/.github/workflows/push-workflows.yml index a66a193..b18fbe2 100644 --- a/.github/workflows/push-workflows.yml +++ b/.github/workflows/push-workflows.yml @@ -16,6 +16,11 @@ jobs: Publish: needs: call-resuable-workflows runs-on: ubuntu-latest + permissions: + contents: write # to be able to publish a GitHub release + issues: write # to be able to comment on released issues + pull-requests: write # to be able to comment on released pull requests + id-token: write # to enable use of OIDC for npm provenance strategy: fail-fast: false matrix: @@ -24,6 +29,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: Setup Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: @@ -31,7 +38,9 @@ jobs: registry-url: https://registry.npmjs.org/ cache: 'npm' - name: Install dependencies - run: npm ci + run: npm clean-install + - name: Verify the integrity of provenance attestations and registry signatures for installed dependencies + run: npm audit signatures - name: Release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.releaserc.json b/.releaserc.json new file mode 100644 index 0000000..5f88a55 --- /dev/null +++ b/.releaserc.json @@ -0,0 +1,9 @@ +{ + "plugins": [ + "@semantic-release/commit-analyzer", + "@semantic-release/release-notes-generator", + "@semantic-release/npm", + "@semantic-release/github", + "@semantic-release/changelog" + ] + } \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 3a043f8..6a34845 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "license": "BSD-3-Clause", "devDependencies": { "@semantic-release/changelog": "^6.0.3", + "@semantic-release/release-notes-generator": "^12.0.0", "eslint": "^7.26.0", "jest": "^26.6.3", "semantic-release": "^22.0.5" diff --git a/package.json b/package.json index 3ad6596..fbda4ad 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ }, "repository": { "type": "git", - "url": "https://github.com/shadiabuhilal/rtl-detect.git" + "url": "git+https://github.com/shadiabuhilal/rtl-detect.git" }, "keywords": [ "rtl-detect", @@ -42,11 +42,9 @@ "url": "https://github.com/shadiabuhilal/rtl-detect/blob/master/LICENSE.md" } ], - "release": { - "branches": ["master"] - }, "devDependencies": { "@semantic-release/changelog": "^6.0.3", + "@semantic-release/release-notes-generator": "^12.0.0", "eslint": "^7.26.0", "jest": "^26.6.3", "semantic-release": "^22.0.5"