Skip to content

Commit

Permalink
CI: let auto publish with branch protection enabled (#3987)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrmod authored Jun 5, 2024
1 parent 59025f1 commit 3013c27
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,17 @@ jobs:
- name: Lint
run: yarn lint

- name: Generate a token
id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.ADBLOCKERBOT_APP_ID }}
private-key: ${{ secrets.ADBLOCKERBOT_PRIVATE_KEY }}

- name: Create release
run: yarn release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
PROTECTED_BRANCH_REVIEWER_TOKEN: ${{ steps.generate-token.outputs.token }}
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
"format-fix": "prettier './packages/**/*.ts' --write"
},
"devDependencies": {
"@auto-it/protected-branch": "^11.1.6",
"@eslint/js": "^9.3.0",
"@remusao/auto-config": "^1.1.2",
"@types/benchmark": "^2.1.3",
Expand All @@ -88,7 +89,10 @@
"auto": {
"extends": "@remusao/auto-config",
"name": "Adblocker Bot",
"email": "adblocker-bot@users.noreply.github.com"
"email": "adblocker-bot@users.noreply.github.com",
"plugins": [
"protected-branch"
]
},
"packageManager": "yarn@4.2.2"
}
14 changes: 14 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,19 @@ __metadata:
languageName: node
linkType: hard

"@auto-it/protected-branch@npm:^11.1.6":
version: 11.1.6
resolution: "@auto-it/protected-branch@npm:11.1.6"
dependencies:
"@auto-it/core": "npm:11.1.6"
"@octokit/rest": "npm:^18.12.0"
fp-ts: "npm:^2.5.3"
io-ts: "npm:^2.1.2"
tslib: "npm:1.10.0"
checksum: 10/ab4ebbd4a9fe48347c7110b072178faf1d2088ff91a8487968859b7c73cde42a36a82abc810ab9883ed0942ebbe5184e038365f1d953a2d70f02646923ab186b
languageName: node
linkType: hard

"@auto-it/released@npm:11.1.6":
version: 11.1.6
resolution: "@auto-it/released@npm:11.1.6"
Expand Down Expand Up @@ -2409,6 +2422,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "adblocker@workspace:."
dependencies:
"@auto-it/protected-branch": "npm:^11.1.6"
"@eslint/js": "npm:^9.3.0"
"@remusao/auto-config": "npm:^1.1.2"
"@types/benchmark": "npm:^2.1.3"
Expand Down

0 comments on commit 3013c27

Please sign in to comment.