diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 5cb598ad..2cdba54c 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,9 +1,5 @@ -* @contentstack/launch-pr-reviewers @contentstack/launch-solution-engineers - -.github/workflows/sca-scan.yml @contentstack/security-admin - +* @contentstack/launch-pr-reviewers +.github/workflows/ @contentstack/security-admin **/.snyk @contentstack/security-admin - -.github/workflows/policy-scan.yml @contentstack/security-admin - -.github/workflows/issues-jira.yml @contentstack/security-admin +**/CODEOWNERS @contentstack/security-admin +**/.gitguardian.yaml @contentstack/security-admin \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index beb442db..e2f796b0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,74 +1,25 @@ -name: Release +name: Publish package to npmjs registry on: - push: - branches: - - main -jobs: - build: - name: Build and upload - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: "22.x" - - name: Installing dependencies - run: npm install - - name: Build - run: npm run prepack - - name: Upload dist - uses: actions/upload-artifact@v4 - with: - name: dist - path: dist - release: - name: Download dist and release + types: [published] +jobs: + publish-npm: runs-on: ubuntu-latest - needs: build + permissions: + contents: read + id-token: write steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: "22.x" - - name: Installing dependencies - run: npm install - - name: Download dist - uses: actions/download-artifact@v4 - with: - name: dist - path: dist - - name: Display dirs - run: ls -R - - name: Release - id: release-plugin - uses: JS-DevTools/npm-publish@v3 - with: - token: "${{ secrets.NPM_TOKEN }}" - access: public - - name: get-npm-version - id: package-version - uses: martinbeentjes/npm-get-version-action@v1.3.1 - uses: actions/checkout@v4 - if: ${{ steps.release-plugin.conclusion == 'success' }} with: - ref: 'main' - - uses: EndBug/add-and-commit@v9 - if: ${{ steps.release-plugin.conclusion == 'success' }} + ref: ${{ github.event.release.tag_name }} + persist-credentials: false + - uses: actions/setup-node@v4 with: - message: "Released version ${{ steps.package-version.outputs.current-version }}" - push: true - - name: github-release - id: github-release - env: - GITHUB_TOKEN: ${{ secrets.PKG_TOKEN }} - VERSION: ${{ steps.release-plugin.outputs.version }} - run: gh release create v"$VERSION" --title "Release $VERSION" --generate-notes \ No newline at end of file + node-version: 24 + registry-url: https://registry.npmjs.org/ + cache: 'npm' + - run: npm ci + - name: Update npm + run: npm install -g npm@latest + - name: Release + run: npm publish --access public