diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 31cc3f2..3ba5e3b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -2,11 +2,20 @@ name: Release on: [push] +permissions: + # Needed to create PR statuses/checks + checks: write + statuses: write + # Needed to push git tags, release + contents: write + jobs: release: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: Prepare repository run: git fetch --unshallow --tags @@ -27,6 +36,7 @@ jobs: - name: Create Release env: GH_TOKEN: ${{ secrets.PORTAL_JS_SDK_TOKEN }} + PROTECTED_BRANCH_REVIEWER_TOKEN: ${{ secrets.PORTAL_JS_SDK_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN_PRIVATE_PUBLISH }} run: | yarn install --frozen-lockfile diff --git a/package.json b/package.json index 5602471..a88fa38 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,8 @@ }, "repository": "git@github.com:Kong/sdk-portal-js.git", "devDependencies": { - "auto": "^10.46.0", + "@auto-it/protected-branch": "11.0.4", + "auto": "10.46.0", "typescript": "5.0.2" }, "dependencies": { @@ -20,7 +21,8 @@ "author": "kong-apiops ", "auto": { "plugins": [ - "npm" + "npm", + "protected-branch" ] } } diff --git a/yarn.lock b/yarn.lock index 8980f94..8bacf70 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7,6 +7,11 @@ resolved "https://registry.yarnpkg.com/@auto-it/bot-list/-/bot-list-10.46.0.tgz#8e8c3d3bb68b8b4e13705fff373fbdab14869249" integrity sha512-QkkBgQVi1g/1Tpxcs3Hm3zTzaaM0xjiIRt5xEA6TRM/ULdgEqY+Jk/w1fJZe9GVF+53mwRfqGtQeJirilMBH6g== +"@auto-it/bot-list@11.0.4": + version "11.0.4" + resolved "https://registry.yarnpkg.com/@auto-it/bot-list/-/bot-list-11.0.4.tgz#a247281531bc4ee4bde791515fd6ad98bc48afe0" + integrity sha512-f3w9UZ655MLiELUQP28K9Gceptf2vvKdKVRzh2b2ST+PG/srmoxCnHgE/TO9afW7NiuUA1h+hQVyIb0eQ9VSfQ== + "@auto-it/core@10.46.0": version "10.46.0" resolved "https://registry.yarnpkg.com/@auto-it/core/-/core-10.46.0.tgz#f7445ab03478cd9819e6bb78b1e5a441240dbf5f" @@ -53,6 +58,52 @@ typescript-memoize "^1.0.0-alpha.3" url-join "^4.0.0" +"@auto-it/core@11.0.4": + version "11.0.4" + resolved "https://registry.yarnpkg.com/@auto-it/core/-/core-11.0.4.tgz#2a030c4eb58d70a8e74480e1d92b72b5cc824d9c" + integrity sha512-oYIByeGeuiM0MhWibbj3Y4Vj8p5Kt1n4g0hKL7Zu7oFlKmAjsZlwbH4z0wEjVTdK2+Eqg2/I1Dj/GgkiSriXgg== + dependencies: + "@auto-it/bot-list" "11.0.4" + "@endemolshinegroup/cosmiconfig-typescript-loader" "^3.0.2" + "@octokit/core" "^3.5.1" + "@octokit/plugin-enterprise-compatibility" "1.3.0" + "@octokit/plugin-retry" "^3.0.9" + "@octokit/plugin-throttling" "^3.6.2" + "@octokit/rest" "^18.12.0" + await-to-js "^3.0.0" + chalk "^4.0.0" + cosmiconfig "7.0.0" + deepmerge "^4.0.0" + dotenv "^8.0.0" + endent "^2.1.0" + enquirer "^2.3.4" + env-ci "^5.0.1" + fast-glob "^3.1.1" + fp-ts "^2.5.3" + fromentries "^1.2.0" + gitlog "^4.0.3" + https-proxy-agent "^5.0.0" + import-cwd "^3.0.0" + import-from "^3.0.0" + io-ts "^2.1.2" + lodash.chunk "^4.2.0" + log-symbols "^4.0.0" + node-fetch "2.6.7" + parse-author "^2.0.0" + parse-github-url "1.0.2" + pretty-ms "^7.0.0" + requireg "^0.2.2" + semver "^7.0.0" + signale "^1.4.0" + tapable "^2.2.0" + terminal-link "^2.1.1" + tinycolor2 "^1.4.1" + ts-node "^10.9.1" + tslib "2.1.0" + type-fest "^0.21.1" + typescript-memoize "^1.0.0-alpha.3" + url-join "^4.0.0" + "@auto-it/npm@10.46.0": version "10.46.0" resolved "https://registry.yarnpkg.com/@auto-it/npm/-/npm-10.46.0.tgz#2c139b831fe73eee7b9065de01a953525eba20f1" @@ -81,6 +132,17 @@ parse-author "^2.0.0" parse-github-url "1.0.2" +"@auto-it/protected-branch@11.0.4": + version "11.0.4" + resolved "https://registry.yarnpkg.com/@auto-it/protected-branch/-/protected-branch-11.0.4.tgz#e1c0e99a841d01adaade5fa09da95b5eee745abe" + integrity sha512-vb5WlyL1esG6u4BkGX7BIyop2iMvIpe0T+h4zlLsWVx/P7mkwy8r851sSVYG+ECeCl4WhJDE3rTaM/aLA2j8VQ== + dependencies: + "@auto-it/core" "11.0.4" + "@octokit/rest" "^18.12.0" + fp-ts "^2.5.3" + io-ts "^2.1.2" + tslib "1.10.0" + "@auto-it/released@10.46.0": version "10.46.0" resolved "https://registry.yarnpkg.com/@auto-it/released/-/released-10.46.0.tgz#9e18c909f7e067e3769ee439290404e28420bae0" @@ -421,7 +483,7 @@ author-regex@^1.0.0: resolved "https://registry.yarnpkg.com/author-regex/-/author-regex-1.0.0.tgz#d08885be6b9bbf9439fe087c76287245f0a81450" integrity sha512-KbWgR8wOYRAPekEmMXrYYdc7BRyhn2Ftk7KWfMUnQ43hFdojWEFRxhhRUm3/OFEdPa1r0KAvTTg9YQK57xTe0g== -auto@^10.46.0: +auto@10.46.0: version "10.46.0" resolved "https://registry.yarnpkg.com/auto/-/auto-10.46.0.tgz#0e1f51e60341fb5cc6851de499b2d41c0b938436" integrity sha512-LUsn5SWyM6Qdz2i1h4YyDpBYlOUQ0Z+ZcQhDTu8DLLoUuUP4cGf79MCdpRpM1LQVbkqZ2WWi8s/QM4it/FmRjw==