Skip to content

Commit b1c6d31

Browse files
authored
devops: github release bot (#82)
1 parent f5fe73f commit b1c6d31

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

.github/workflows/main.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,23 +60,39 @@ jobs:
6060
needs:
6161
- test
6262
steps:
63+
- name: Generate bot app token
64+
id: generate_token
65+
uses: actions/create-github-app-token@v1
66+
with:
67+
app-id: ${{ secrets.RELEASER_ID }}
68+
private-key: ${{ secrets.RELEASER_PRIVATE_KEY }}
6369
- name: PNPM Setup
6470
uses: pnpm/action-setup@v2
6571
with:
6672
version: "10.x"
6773
- name: Checkout
6874
uses: actions/checkout@v4
6975
with:
76+
token: ${{ steps.generate_token.outputs.token }}
7077
fetch-depth: 0
78+
persist-credentials: false
7179
- name: Setup Node.js
7280
uses: actions/setup-node@v4
7381
with:
7482
node-version: "lts/*"
7583
cache: "pnpm"
84+
- name: Get bot user ID
85+
id: bot-user-id
86+
run: |
87+
echo "user-id=$(gh api "/users/${{ steps.generate_token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
88+
env:
89+
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
7690
- name: Install dependencies
7791
run: pnpm install --frozen-lockfile
7892
- name: Release
7993
env:
80-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
94+
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
8195
NPM_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
96+
GIT_AUTHOR_EMAIL: "${{ steps.bot-user-id.outputs.user-id }}+${{ steps.generate_token.outputs.app-slug }}[bot]@users.noreply.github.com"
97+
GIT_COMMITTER_EMAIL: "${{ steps.bot-user-id.outputs.user-id }}+${{ steps.generate_token.outputs.app-slug }}[bot]@users.noreply.github.com"
8298
run: pnpm release

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# 🎭 Playwright Angular component testing
22

3-
> **Note**
43
> The API has been designed to closely resemble Playwright's API wherever applicable. This library is _(without guarantee)_ aimed at facilitating a smooth transition once Playwright offers official support for Angular component testing.
54
65
## Capabilities

playwright-ct-angular/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# 🎭 Playwright Angular component testing
22

3-
> **Note**
43
> The API has been designed to closely resemble Playwright's API wherever applicable. This library is _(without guarantee)_ aimed at facilitating a smooth transition once Playwright offers official support for Angular component testing.
54
65
## Capabilities

0 commit comments

Comments
 (0)