File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # local build for automation repo scripts
2+ name : build
3+
4+ on :
5+ push :
6+ branches : [main]
7+ paths : ["src/**", "package.json"]
8+
9+ jobs :
10+ build :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - name : Generate a token
14+ id : bot-token
15+ uses : actions/create-github-app-token@v1
16+ with :
17+ app-id : ${{ secrets.BOT_APP_ID }}
18+ private-key : ${{ secrets.BOT_PRIVATE_KEY }}
19+
20+ - uses : actions/checkout@v4
21+ with :
22+ token : ${{ steps.bot-token.outputs.token }}
23+
24+ - name : Setup PNPM
25+ uses : pnpm/action-setup@v4
26+
27+ - name : Setup Node
28+ uses : actions/setup-node@v4
29+ with :
30+ node-version : 22
31+ cache : pnpm
32+
33+ - name : Install dependencies
34+ run : pnpm install
35+
36+ - name : Build
37+ run : pnpm run build
38+
39+ - name : Commit dist
40+ uses : stefanzweifel/git-auto-commit-action@v5
41+ env :
42+ GH_TOKEN : ${{ steps.bot-token.outputs.token }}
43+ with :
44+ commit_message : " [ci] build"
45+ file_pattern : " dist/*"
46+ commit_user_name : bombshell-bot
Original file line number Diff line number Diff line change 5555 uses : actions/setup-node@v4
5656 with :
5757 node-version : 22
58- registry-url : https://registry.npmjs.org/
59- cache : " pnpm"
6058
6159 - id : message
6260 name : Format Discord message
@@ -67,10 +65,10 @@ jobs:
6765 COMMIT_ID : ${{ github.event.commits[0].id }}
6866 EMOJIS : ${{ inputs.EMOJIS }}
6967 COAUTHOR_TEMPLATES : ${{ inputs.COAUTHOR_TEMPLATES }}
70- run : node automation/scripts /mergebot.js
68+ run : node automation/dist /mergebot.mjs
7169
7270 - name : Send message on Discord
7371 env :
7472 DISCORD_WEBHOOK : ${{ secrets.DISCORD_WEBHOOK }}
7573 DISCORD_MESSAGE : " ${{ steps.message.outputs.DISCORD_MESSAGE }}"
76- run : node automation/scripts /discord.js
74+ run : node automation/dist /discord.mjs
Original file line number Diff line number Diff line change 11node_modules
2+ dist
Original file line number Diff line number Diff line change 11{
2- "type" : " module"
2+ "name" : " @bomb.sh/automation" ,
3+ "private" : true ,
4+ "type" : " module" ,
5+ "exports" : {
6+ "./*" : " ./dist/*.mjs"
7+ },
8+ "scripts" : {
9+ "build" : " bsh build --bundle"
10+ },
11+ "devDependencies" : {
12+ "@bomb.sh/tools" : " ^0.2.1" ,
13+ "@types/node" : " ^22.19.15"
14+ }
315}
You can’t perform that action at this time.
0 commit comments