-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (75 loc) · 2.32 KB
/
setup.yml
File metadata and controls
81 lines (75 loc) · 2.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Setup Solvely Launchpad
on:
workflow_dispatch:
inputs:
preset:
description: 'Preset to apply'
required: true
default: node-lib
type: choice
options:
- node-lib
- nextjs
- turbo
- bun
- pnpm-monorepo
- python
- go
- rust
package-manager:
description: 'Package manager override'
required: true
default: npm
type: choice
options:
- npm
- pnpm
- yarn
create-policy:
description: 'Create .citemplate.yml'
required: true
default: true
type: boolean
permissions:
contents: write
pull-requests: write
jobs:
setup:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: 22
- name: Bootstrap Launchpad files
run: |
if [ -f "./cli/bin/launchpad.js" ]; then
node ./cli/bin/launchpad.js init \
--preset "${{ inputs.preset }}" \
--package-manager "${{ inputs.package-manager }}" \
--policy "${{ inputs.create-policy }}" \
--yes
else
npx -y solvely-launchpad init \
--preset "${{ inputs.preset }}" \
--package-manager "${{ inputs.package-manager }}" \
--policy "${{ inputs.create-policy }}" \
--yes
fi
- name: Commit setup branch
env:
BRANCH: chore/setup-launchpad-${{ github.run_id }}
GH_TOKEN: ${{ github.token }}
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git checkout -b "$BRANCH"
git add .
git commit -m "chore(ci): setup launchpad preset ${{ inputs.preset }}"
git push -u origin "$BRANCH"
gh pr create \
--title "chore(ci): bootstrap launchpad (${{ inputs.preset }})" \
--body "Automated setup using Solvely Launchpad setup workflow." \
--base "${{ github.ref_name }}" \
--head "$BRANCH"