pipecraft 0.0.0-releaseit → 0.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (183) hide show
  1. package/README.md +126 -108
  2. package/dist/cli/index.d.ts +69 -0
  3. package/dist/cli/index.d.ts.map +1 -1
  4. package/dist/cli/index.js +94 -22
  5. package/dist/cli/index.js.map +1 -1
  6. package/dist/generators/init.tpl.d.ts +70 -0
  7. package/dist/generators/init.tpl.d.ts.map +1 -1
  8. package/dist/generators/init.tpl.js +100 -8
  9. package/dist/generators/init.tpl.js.map +1 -1
  10. package/dist/generators/workflows.tpl.d.ts +86 -0
  11. package/dist/generators/workflows.tpl.d.ts.map +1 -1
  12. package/dist/generators/workflows.tpl.js +101 -9
  13. package/dist/generators/workflows.tpl.js.map +1 -1
  14. package/dist/templates/actions/calculate-version.yml.tpl.d.ts +47 -0
  15. package/dist/templates/actions/calculate-version.yml.tpl.d.ts.map +1 -1
  16. package/dist/templates/actions/calculate-version.yml.tpl.js +72 -3
  17. package/dist/templates/actions/calculate-version.yml.tpl.js.map +1 -1
  18. package/dist/templates/actions/create-pr.yml.tpl.d.ts +14 -0
  19. package/dist/templates/actions/create-pr.yml.tpl.d.ts.map +1 -1
  20. package/dist/templates/actions/create-pr.yml.tpl.js +22 -2
  21. package/dist/templates/actions/create-pr.yml.tpl.js.map +1 -1
  22. package/dist/templates/actions/create-release.yml.tpl.d.ts +18 -0
  23. package/dist/templates/actions/create-release.yml.tpl.d.ts.map +1 -0
  24. package/dist/templates/actions/create-release.yml.tpl.js +141 -0
  25. package/dist/templates/actions/create-release.yml.tpl.js.map +1 -0
  26. package/dist/templates/actions/create-tag.yml.tpl.d.ts +14 -0
  27. package/dist/templates/actions/create-tag.yml.tpl.d.ts.map +1 -1
  28. package/dist/templates/actions/create-tag.yml.tpl.js +22 -2
  29. package/dist/templates/actions/create-tag.yml.tpl.js.map +1 -1
  30. package/dist/templates/actions/detect-changes.yml.tpl.d.ts +70 -0
  31. package/dist/templates/actions/detect-changes.yml.tpl.d.ts.map +1 -1
  32. package/dist/templates/actions/detect-changes.yml.tpl.js +98 -2
  33. package/dist/templates/actions/detect-changes.yml.tpl.js.map +1 -1
  34. package/dist/templates/actions/manage-branch.yml.tpl.d.ts +14 -0
  35. package/dist/templates/actions/manage-branch.yml.tpl.d.ts.map +1 -1
  36. package/dist/templates/actions/manage-branch.yml.tpl.js +22 -2
  37. package/dist/templates/actions/manage-branch.yml.tpl.js.map +1 -1
  38. package/dist/templates/actions/promote-branch.yml.tpl.d.ts +14 -0
  39. package/dist/templates/actions/promote-branch.yml.tpl.d.ts.map +1 -1
  40. package/dist/templates/actions/promote-branch.yml.tpl.js +50 -7
  41. package/dist/templates/actions/promote-branch.yml.tpl.js.map +1 -1
  42. package/dist/templates/workflows/pipeline-path-based.yml.tpl.d.ts +114 -1
  43. package/dist/templates/workflows/pipeline-path-based.yml.tpl.d.ts.map +1 -1
  44. package/dist/templates/workflows/pipeline-path-based.yml.tpl.js +479 -74
  45. package/dist/templates/workflows/pipeline-path-based.yml.tpl.js.map +1 -1
  46. package/dist/types/index.d.ts +231 -8
  47. package/dist/types/index.d.ts.map +1 -1
  48. package/dist/types/index.js +9 -0
  49. package/dist/types/index.js.map +1 -1
  50. package/dist/utils/ast-path-operations.d.ts.map +1 -1
  51. package/dist/utils/ast-path-operations.js +24 -11
  52. package/dist/utils/ast-path-operations.js.map +1 -1
  53. package/dist/utils/config.d.ts +63 -0
  54. package/dist/utils/config.d.ts.map +1 -1
  55. package/dist/utils/config.js +71 -0
  56. package/dist/utils/config.js.map +1 -1
  57. package/dist/utils/github-setup.d.ts +323 -2
  58. package/dist/utils/github-setup.d.ts.map +1 -1
  59. package/dist/utils/github-setup.js +551 -23
  60. package/dist/utils/github-setup.js.map +1 -1
  61. package/dist/utils/idempotency.d.ts +147 -7
  62. package/dist/utils/idempotency.d.ts.map +1 -1
  63. package/dist/utils/idempotency.js +143 -15
  64. package/dist/utils/idempotency.js.map +1 -1
  65. package/dist/utils/logger.d.ts +134 -0
  66. package/dist/utils/logger.d.ts.map +1 -0
  67. package/dist/utils/logger.js +153 -0
  68. package/dist/utils/logger.js.map +1 -0
  69. package/dist/utils/preflight.d.ts +223 -12
  70. package/dist/utils/preflight.d.ts.map +1 -1
  71. package/dist/utils/preflight.js +216 -16
  72. package/dist/utils/preflight.js.map +1 -1
  73. package/dist/utils/versioning.d.ts +160 -8
  74. package/dist/utils/versioning.d.ts.map +1 -1
  75. package/dist/utils/versioning.js +179 -15
  76. package/dist/utils/versioning.js.map +1 -1
  77. package/package.json +26 -5
  78. package/.claude/settings.local.json +0 -35
  79. package/.github/actions/calculate-version/action.yml +0 -106
  80. package/.github/actions/create-pr/action.yml +0 -122
  81. package/.github/actions/create-release/action.yml +0 -74
  82. package/.github/actions/create-tag/action.yml +0 -94
  83. package/.github/actions/detect-changes/action.yml +0 -62
  84. package/.github/actions/manage-branch/action.yml +0 -113
  85. package/.github/actions/promote-branch/action.yml +0 -352
  86. package/.github/example/workflows/job.analyze.code.yml +0 -26
  87. package/.github/example/workflows/job.analyze.docker.yml +0 -32
  88. package/.github/example/workflows/job.app.api.deploy.yml +0 -127
  89. package/.github/example/workflows/job.app.api.test.yml +0 -102
  90. package/.github/example/workflows/job.app.docs.deploy.yml +0 -40
  91. package/.github/example/workflows/job.app.docs.test.yml +0 -50
  92. package/.github/example/workflows/job.app.web.deploy.yml +0 -96
  93. package/.github/example/workflows/job.app.web.test.yml +0 -49
  94. package/.github/example/workflows/job.changes.yml +0 -82
  95. package/.github/example/workflows/job.create-pr.yml +0 -96
  96. package/.github/example/workflows/job.env-check.yml +0 -43
  97. package/.github/example/workflows/job.fast-forward.yml +0 -103
  98. package/.github/example/workflows/job.lint.yml +0 -64
  99. package/.github/example/workflows/job.pr-name.yml +0 -70
  100. package/.github/example/workflows/job.pr-squash-name.yml +0 -27
  101. package/.github/example/workflows/job.tag.yml +0 -38
  102. package/.github/example/workflows/job.version.yml +0 -99
  103. package/.github/example/workflows/lib.plugin-base.publish.yml +0 -59
  104. package/.github/example/workflows/pipe.yml +0 -178
  105. package/.github/example/workflows/scripts/fastforward.sh +0 -51
  106. package/.github/example/workflows/scripts/pipe-cleaner.sh +0 -70
  107. package/.github/scripts/fastforward.sh +0 -51
  108. package/.github/scripts/pipe-cleaner.sh +0 -70
  109. package/.github/workflows/pipeline.yml +0 -220
  110. package/.github/workflows/pr-title-check.yml +0 -70
  111. package/.github/workflows/publish.yml +0 -39
  112. package/.pipecraftrc.json +0 -78
  113. package/.release-it.cjs +0 -71
  114. package/PIPELINE_TESTING_PLAN.md +0 -499
  115. package/TRUNK_FLOW_PLAN.md +0 -401
  116. package/assets/logo_banner.png +0 -0
  117. package/assets/logo_banner.webp +0 -0
  118. package/docs/USER_JOURNEY_ERRORS.md +0 -352
  119. package/eslint.config.js +0 -77
  120. package/examples/basic-config.json +0 -41
  121. package/examples/monorepo-config.json +0 -49
  122. package/examples/usage.md +0 -289
  123. package/scripts/debug-workflows.sh +0 -339
  124. package/scripts/parse-pipeline.js +0 -29
  125. package/scripts/test-job-order.cjs +0 -140
  126. package/scripts/validate-pipeline.cjs +0 -379
  127. package/scripts/verify-job-order.sh +0 -30
  128. package/src/cli/index.ts +0 -414
  129. package/src/generators/init.tpl.ts +0 -126
  130. package/src/generators/workflows.tpl.ts +0 -80
  131. package/src/templates/actions/calculate-version.yml.tpl.ts +0 -124
  132. package/src/templates/actions/create-pr.yml.tpl.ts +0 -147
  133. package/src/templates/actions/create-tag.yml.tpl.ts +0 -112
  134. package/src/templates/actions/detect-changes.yml.tpl.ts +0 -87
  135. package/src/templates/actions/manage-branch.yml.tpl.ts +0 -132
  136. package/src/templates/actions/promote-branch.yml.tpl.ts +0 -364
  137. package/src/templates/workflows/pipeline-path-based.yml.tpl.ts +0 -706
  138. package/src/types/index.ts +0 -64
  139. package/src/utils/README-ast-path-operations.md +0 -390
  140. package/src/utils/ast-path-operations.ts +0 -581
  141. package/src/utils/config.ts +0 -64
  142. package/src/utils/github-setup.ts +0 -558
  143. package/src/utils/idempotency.ts +0 -215
  144. package/src/utils/preflight.ts +0 -306
  145. package/src/utils/versioning.ts +0 -244
  146. package/tests/README.md +0 -229
  147. package/tests/TEST_STRUCTURE.md +0 -256
  148. package/tests/act/run-act-tests.sh +0 -345
  149. package/tests/debugging/debug-utils.ts +0 -538
  150. package/tests/debugging/debug-workflow.test.ts +0 -339
  151. package/tests/debugging/debug-workflows.sh +0 -339
  152. package/tests/debugging/iterative-debug.ts +0 -652
  153. package/tests/debugging/run-debug-tests.sh +0 -431
  154. package/tests/fixtures/basic-config.json +0 -51
  155. package/tests/fixtures/invalid-config.json +0 -9
  156. package/tests/fixtures/pipeline-generated.yml +0 -235
  157. package/tests/fixtures/pipeline-preserve-comments.yml +0 -245
  158. package/tests/fixtures/pipeline-user-modified.yml +0 -245
  159. package/tests/fixtures/test-config.json +0 -58
  160. package/tests/github-live/README.md +0 -250
  161. package/tests/github-local/JOB_WORKFLOW_TESTS.md +0 -296
  162. package/tests/github-local/README.md +0 -240
  163. package/tests/github-local/run-all-tests.sh +0 -422
  164. package/tests/github-local/test-job-workflows.sh +0 -631
  165. package/tests/github-local/test-pipeline-workflow.sh +0 -440
  166. package/tests/integration/generators.test.ts +0 -578
  167. package/tests/integration/path-based-template.test.ts +0 -510
  168. package/tests/integration/simple-path-based.test.ts +0 -415
  169. package/tests/setup.ts +0 -56
  170. package/tests/unit/ast-path-operations-extended.test.ts +0 -302
  171. package/tests/unit/cli.test.ts +0 -541
  172. package/tests/unit/config-extended.test.ts +0 -412
  173. package/tests/unit/config.test.ts +0 -152
  174. package/tests/unit/github-setup.test.ts +0 -189
  175. package/tests/unit/idempotency-isolated.test.ts +0 -297
  176. package/tests/unit/job-order.test.ts +0 -157
  177. package/tests/unit/pipeline-path-based.test.ts +0 -511
  178. package/tests/unit/validate-pipeline.test.ts +0 -384
  179. package/tests/unit/versioning-extended.test.ts +0 -279
  180. package/tests/unit/versioning.test.ts +0 -241
  181. package/tsconfig.debug.json +0 -17
  182. package/tsconfig.json +0 -28
  183. package/vitest.config.ts +0 -51
@@ -1,235 +0,0 @@
1
- ## USER COMMENT 1
2
-
3
- name: "USER NAME"
4
- # USER COMMENT 2
5
- on:
6
- pull_request:
7
- paths:
8
- - '**/*.yml'
9
- - '**/*.yaml'
10
- - '**/*.json'
11
- - '**/*.ts'
12
- - '**/*.js'
13
- - '**/*.tsx'
14
- # USER COMMENT 3
15
- branches:
16
- - develop
17
- - feature
18
- - alpha
19
- - beta
20
- - gamma
21
- - delta
22
- - epsilon
23
- # USER COMMENT 4
24
-
25
- workflow_call:
26
- inputs:
27
- # USER COMMENT 5
28
- fakevar1:
29
- description: 'The fake version to deploy'
30
- required: false
31
- type: string
32
- version:
33
- description: The version to deploy
34
- required: false
35
- type: string
36
- # USER COMMENT 7
37
- fakevar2:
38
- description: 'The fake version to deploy'
39
- required: false
40
- type: string
41
- baseRef:
42
- description: The base reference for comparison
43
- required: false
44
- type: string
45
- # USER COMMENT 8
46
- outputs:
47
- fakevar3:
48
- value: 'fakevalue3'
49
- fakevar4:
50
- value: 'fakevalue4'
51
- workflow_dispatch:
52
- inputs:
53
- version:
54
- description: The version to deploy
55
- required: false
56
- type: string
57
- baseRef:
58
- description: The base reference for comparison
59
- required: false
60
- type: string
61
-
62
- jobs:
63
- # USER COMMENT 9
64
-
65
- fake-job-1:
66
- # USER COMMENT 10
67
- runs-on: ubuntu-latest
68
- steps:
69
- - name: Fake Job
70
- run: |
71
- echo "Running fake job"
72
-
73
- # =============================================================================
74
- # CHANGES DETECTION
75
- # =============================================================================
76
- # USER COMMENT 11
77
- changes:
78
- runs-on: ubuntu-latest
79
- steps:
80
- - uses: ./.github/actions/detect-changes
81
- with:
82
- baseRef: ${{ inputs.baseRef || 'epsilon' }}
83
-
84
- # USER COMMENT 12
85
- fake-job-2:
86
- # USER COMMENT 13
87
- runs-on: ubuntu-latest
88
- steps:
89
- - name: Fake Job
90
- run: |
91
- echo "Running fake job"
92
-
93
- # =============================================================================
94
- # TESTING JOBS
95
- # =============================================================================
96
- # Add your testing jobs here
97
- # Example:
98
- # test-api:
99
- # needs: branch
100
- # runs-on: ubuntu-latest
101
- # steps:
102
- # - name: Test API
103
- # run: |
104
- # echo "Run API tests"
105
- #
106
- # test-web:
107
- # needs: branch
108
- # runs-on: ubuntu-latest
109
- # steps:
110
- # - name: Test Web
111
- # run: |
112
- # echo "Run Web tests"
113
-
114
-
115
- # USER COMMENT 14
116
-
117
- fake-job-3:
118
- # USER COMMENT 15
119
- runs-on: ubuntu-latest
120
- steps:
121
- - name: Fake Job
122
- run: |
123
- echo "Running fake job"
124
-
125
- # =============================================================================
126
- # VERSIONING
127
- # =============================================================================
128
- version:
129
- if: github.ref_name == 'alpha'
130
- needs: changes
131
- runs-on: ubuntu-latest
132
- steps:
133
- - uses: ./.github/actions/calculate-version
134
- with:
135
- baseRef: ${{ inputs.baseRef || 'epsilon' }}
136
-
137
- # USER COMMENT 16
138
-
139
- fake-job-4:
140
- # USER COMMENT 17
141
- runs-on: ubuntu-latest
142
- steps:
143
- - name: Fake Job
144
- run: |
145
- echo "Running fake job"
146
-
147
- # USER COMMENT 18
148
-
149
- fake-job-5:
150
- # USER COMMENT 19
151
- runs-on: ubuntu-latest
152
- steps:
153
- - name: Fake Job
154
- run: |
155
- echo "Running fake job"
156
-
157
- # USER COMMENT 20
158
-
159
- # =============================================================================
160
- # DEPLOYMENT JOBS
161
- # =============================================================================
162
- deploy-api:
163
- needs: branch
164
- runs-on: ubuntu-latest
165
- steps:
166
- - name: Deploy API
167
- run: |
168
- echo "Deploy API to production"
169
-
170
- fake-job-6:
171
- # USER COMMENT 21
172
- runs-on: ubuntu-latest
173
- steps:
174
- - name: Fake Job
175
- run: |
176
- echo "Running fake job"
177
-
178
- # =============================================================================
179
- # TAG & CREATE PR
180
- # =============================================================================
181
- tag:
182
- if: github.ref_name == 'alpha'
183
- needs: version
184
- runs-on: ubuntu-latest
185
- steps:
186
- - uses: ./.github/actions/create-tag
187
- with:
188
- version: ${{ needs.version.outputs.nextVersion }}
189
-
190
- # USER COMMENT 22
191
-
192
- fake-job-7:
193
- # USER COMMENT 23
194
- runs-on: ubuntu-latest
195
- steps:
196
- - name: Fake Job
197
- run: |
198
- echo "Running fake job"
199
-
200
- createpr:
201
- ## SHOULD BE ANY BRANCH EXCEPT the final branch
202
- if: github.ref_name != 'epsilon'
203
- needs: tag
204
- runs-on: ubuntu-latest
205
- steps:
206
- - uses: ./.github/actions/create-pr
207
- with:
208
- sourceBranch: ${{ github.ref_name }}
209
- targetBranch: ${{ github.ref_name == 'alpha' && 'beta' || github.ref_name ==
210
- 'beta' && 'gamma' || 'epsilon' }}
211
- title: 'Release ${{ needs.version.outputs.nextVersion }}'
212
- body: 'Automated release PR for version ${{ needs.version.outputs.nextVersion
213
- }}'
214
-
215
- branch:
216
- ## SHOULD BE THE NEXT BRANCH
217
- needs: createpr
218
- runs-on: ubuntu-latest
219
- steps:
220
- - uses: ./.github/actions/manage-branch
221
- with:
222
- action: 'fast-forward'
223
- targetBranch: ${{ github.ref_name == 'alpha' && 'beta' || github.ref_name ==
224
- 'beta' && 'gamma' || 'epsilon' }}
225
- sourceBranch: ${{ github.ref_name }}
226
-
227
- # USER COMMENT 24
228
-
229
- fake-job-8:
230
- # USER COMMENT 25
231
- runs-on: ubuntu-latest
232
- steps:
233
- - name: Fake Job
234
- run: |
235
- echo "Running fake job"
@@ -1,245 +0,0 @@
1
- ## USER COMMENT 1
2
-
3
- name: "USER NAME"
4
- # USER COMMENT 2
5
- on:
6
- pull_request:
7
- paths:
8
- - '**/*.yml'
9
- - '**/*.yaml'
10
- - '**/*.json'
11
- - '**/*.ts'
12
- - '**/*.js'
13
- - '**/*.tsx'
14
- # USER COMMENT 3
15
- branches:
16
- - develop
17
- - feature
18
- - alpha
19
- - beta
20
- - gamma
21
- - delta
22
- - epsilon
23
- # USER COMMENT 4
24
-
25
- workflow_call:
26
- inputs:
27
- # USER COMMENT 5
28
- fakevar1:
29
- description: 'The fake version to deploy'
30
- required: false
31
- type: string
32
- version:
33
- description: The version to deploy
34
- required: false
35
- type: string
36
- # USER COMMENT 7
37
- fakevar2:
38
- description: 'The fake version to deploy'
39
- required: false
40
- type: string
41
- baseRef:
42
- description: The base reference for comparison
43
- required: false
44
- type: string
45
- # USER COMMENT 8
46
- outputs:
47
- fakevar3:
48
- value: 'fakevalue3'
49
- fakevar4:
50
- value: 'fakevalue4'
51
- workflow_dispatch:
52
- inputs:
53
- version:
54
- description: The version to deploy
55
- required: false
56
- type: string
57
- baseRef:
58
- description: The base reference for comparison
59
- required: false
60
- type: string
61
-
62
- jobs:
63
- # USER COMMENT 9
64
-
65
- fake-job-1:
66
- # USER COMMENT 10
67
- runs-on: ubuntu-latest
68
- steps:
69
- - name: Fake Job
70
- run: |
71
- echo "Running fake job"
72
-
73
- # =============================================================================
74
- # CHANGES DETECTION
75
- # =============================================================================
76
- # USER COMMENT 11
77
- changes:
78
- runs-on: ubuntu-latest
79
- steps:
80
- - uses: ./.github/actions/detect-changes
81
- with:
82
- baseRef: ${{ inputs.baseRef || 'epsilon' }}
83
-
84
- # USER COMMENT 12
85
- fake-job-2:
86
- # USER COMMENT 13
87
- runs-on: ubuntu-latest
88
- steps:
89
- - name: Fake Job
90
- run: |
91
- echo "Running fake job"
92
-
93
- # =============================================================================
94
- # TESTING JOBS
95
- # =============================================================================
96
- # Add your testing jobs here
97
- # Example:
98
- # test-api:
99
- # needs: branch
100
- # runs-on: ubuntu-latest
101
- # steps:
102
- # - name: Test API
103
- # run: |
104
- # echo "Run API tests"
105
- #
106
- # test-web:
107
- # needs: branch
108
- # runs-on: ubuntu-latest
109
- # steps:
110
- # - name: Test Web
111
- # run: |
112
- # echo "Run Web tests"
113
-
114
-
115
- # USER COMMENT 14
116
-
117
- fake-job-3:
118
- # USER COMMENT 15
119
- runs-on: ubuntu-latest
120
- steps:
121
- - name: Fake Job
122
- run: |
123
- echo "Running fake job"
124
-
125
- # =============================================================================
126
- # VERSIONING
127
- # =============================================================================
128
- version:
129
- # =============================================================================
130
- # VERSIONING
131
- # =============================================================================
132
- if: github.ref_name == 'alpha'
133
- needs: changes
134
- runs-on: ubuntu-latest
135
- steps:
136
- - uses: ./.github/actions/calculate-version
137
- with:
138
- baseRef: ${{ inputs.baseRef || 'epsilon' }}
139
-
140
- # USER COMMENT 16
141
-
142
- fake-job-4:
143
- # USER COMMENT 17
144
- runs-on: ubuntu-latest
145
- steps:
146
- - name: Fake Job
147
- run: |
148
- echo "Running fake job"
149
-
150
- # USER COMMENT 18
151
-
152
- fake-job-5:
153
- # USER COMMENT 19
154
- runs-on: ubuntu-latest
155
- steps:
156
- - name: Fake Job
157
- run: |
158
- echo "Running fake job"
159
-
160
- # USER COMMENT 20
161
-
162
- # =============================================================================
163
- # DEPLOYMENT JOBS
164
- # =============================================================================
165
- deploy-api:
166
- needs: branch
167
- runs-on: ubuntu-latest
168
- steps:
169
- - name: Deploy API
170
- run: |
171
- echo "Deploy API to production"
172
-
173
- fake-job-6:
174
- # USER COMMENT 21
175
- runs-on: ubuntu-latest
176
- steps:
177
- - name: Fake Job
178
- run: |
179
- echo "Running fake job"
180
-
181
- # =============================================================================
182
- # TAG & CREATE PR
183
- # =============================================================================
184
- tag:
185
- # =============================================================================
186
- # TAG & CREATE PR
187
- # =============================================================================
188
- if: github.ref_name == 'alpha'
189
- needs: version
190
- runs-on: ubuntu-latest
191
- steps:
192
- - uses: ./.github/actions/create-tag
193
- with:
194
- version: ${{ needs.version.outputs.nextVersion }}
195
-
196
- # USER COMMENT 22
197
-
198
- fake-job-7:
199
- # USER COMMENT 23
200
- runs-on: ubuntu-latest
201
- steps:
202
- - name: Fake Job
203
- run: |
204
- echo "Running fake job"
205
-
206
- createpr:
207
- ## SHOULD BE ANY BRANCH EXCEPT the final branch
208
- if: github.ref_name != 'epsilon'
209
- needs: tag
210
- runs-on: ubuntu-latest
211
- steps:
212
- - uses: ./.github/actions/create-pr
213
- with:
214
- sourceBranch: ${{ github.ref_name }}
215
- targetBranch: ${{ github.ref_name == 'alpha' && 'beta' || github.ref_name ==
216
- 'beta' && 'gamma' || github.ref_name == 'gamma' && 'delta' ||
217
- github.ref_name == 'delta' && 'epsilon' || github.ref_name ==
218
- 'epsilon' && 'epsilon' || 'epsilon' }}
219
- title: 'Release ${{ needs.version.outputs.nextVersion }}'
220
- body: 'Automated release PR for version ${{ needs.version.outputs.nextVersion
221
- }}'
222
-
223
- branch:
224
- ## SHOULD BE THE NEXT BRANCH
225
- needs: createpr
226
- runs-on: ubuntu-latest
227
- steps:
228
- - uses: ./.github/actions/manage-branch
229
- with:
230
- action: 'fast-forward'
231
- targetBranch: ${{ github.ref_name == 'alpha' && 'beta' || github.ref_name ==
232
- 'beta' && 'gamma' || github.ref_name == 'gamma' && 'delta' ||
233
- github.ref_name == 'delta' && 'epsilon' || github.ref_name ==
234
- 'epsilon' && 'epsilon' || 'epsilon' }}
235
- sourceBranch: ${{ github.ref_name }}
236
-
237
- # USER COMMENT 24
238
-
239
- fake-job-8:
240
- # USER COMMENT 25
241
- runs-on: ubuntu-latest
242
- steps:
243
- - name: Fake Job
244
- run: |
245
- echo "Running fake job"
@@ -1,245 +0,0 @@
1
- ## USER COMMENT 1
2
-
3
- name: "USER NAME"
4
- # USER COMMENT 2
5
- on:
6
- pull_request:
7
- paths:
8
- - '**/*.yml'
9
- - '**/*.yaml'
10
- - '**/*.json'
11
- - '**/*.ts'
12
- - '**/*.js'
13
- - '**/*.tsx'
14
- # USER COMMENT 3
15
- branches:
16
- - develop
17
- - feature
18
- - alpha
19
- - beta
20
- - gamma
21
- - delta
22
- - epsilon
23
- # USER COMMENT 4
24
-
25
- workflow_call:
26
- inputs:
27
- # USER COMMENT 5
28
- fakevar1:
29
- description: 'The fake version to deploy'
30
- required: false
31
- type: string
32
- version:
33
- description: The version to deploy
34
- required: false
35
- type: string
36
- # USER COMMENT 7
37
- fakevar2:
38
- description: 'The fake version to deploy'
39
- required: false
40
- type: string
41
- baseRef:
42
- description: The base reference for comparison
43
- required: false
44
- type: string
45
- # USER COMMENT 8
46
- outputs:
47
- fakevar3:
48
- value: 'fakevalue3'
49
- fakevar4:
50
- value: 'fakevalue4'
51
- workflow_dispatch:
52
- inputs:
53
- version:
54
- description: The version to deploy
55
- required: false
56
- type: string
57
- baseRef:
58
- description: The base reference for comparison
59
- required: false
60
- type: string
61
-
62
- jobs:
63
- # USER COMMENT 9
64
-
65
- fake-job-1:
66
- # USER COMMENT 10
67
- runs-on: ubuntu-latest
68
- steps:
69
- - name: Fake Job
70
- run: |
71
- echo "Running fake job"
72
-
73
- # =============================================================================
74
- # CHANGES DETECTION
75
- # =============================================================================
76
- # USER COMMENT 11
77
- changes:
78
- runs-on: ubuntu-latest
79
- steps:
80
- - uses: ./.github/actions/detect-changes
81
- with:
82
- baseRef: ${{ inputs.baseRef || epsilon }}
83
-
84
- # USER COMMENT 12
85
- fake-job-2:
86
- # USER COMMENT 13
87
- runs-on: ubuntu-latest
88
- steps:
89
- - name: Fake Job
90
- run: |
91
- echo "Running fake job"
92
-
93
- # =============================================================================
94
- # TESTING JOBS
95
- # =============================================================================
96
- # Add your testing jobs here
97
- # Example:
98
- # test-api:
99
- # needs: branch
100
- # runs-on: ubuntu-latest
101
- # steps:
102
- # - name: Test API
103
- # run: |
104
- # echo "Run API tests"
105
- #
106
- # test-web:
107
- # needs: branch
108
- # runs-on: ubuntu-latest
109
- # steps:
110
- # - name: Test Web
111
- # run: |
112
- # echo "Run Web tests"
113
-
114
-
115
- # USER COMMENT 14
116
-
117
- fake-job-3:
118
- # USER COMMENT 15
119
- runs-on: ubuntu-latest
120
- steps:
121
- - name: Fake Job
122
- run: |
123
- echo "Running fake job"
124
-
125
- # =============================================================================
126
- # VERSIONING
127
- # =============================================================================
128
- version:
129
- # =============================================================================
130
- # VERSIONING
131
- # =============================================================================
132
- if: github.ref_name == 'alpha'
133
- needs: changes
134
- runs-on: ubuntu-latest
135
- steps:
136
- - uses: ./.github/actions/calculate-version
137
- with:
138
- baseRef: ${{ inputs.baseRef || 'epsilon' }}
139
-
140
- # USER COMMENT 16
141
-
142
- fake-job-4:
143
- # USER COMMENT 17
144
- runs-on: ubuntu-latest
145
- steps:
146
- - name: Fake Job
147
- run: |
148
- echo "Running fake job"
149
-
150
- # USER COMMENT 18
151
-
152
- fake-job-5:
153
- # USER COMMENT 19
154
- runs-on: ubuntu-latest
155
- steps:
156
- - name: Fake Job
157
- run: |
158
- echo "Running fake job"
159
-
160
- # USER COMMENT 20
161
-
162
- # =============================================================================
163
- # DEPLOYMENT JOBS
164
- # =============================================================================
165
- deploy-api:
166
- needs: branch
167
- runs-on: ubuntu-latest
168
- steps:
169
- - name: Deploy API
170
- run: |
171
- echo "Deploy API to production"
172
-
173
- fake-job-6:
174
- # USER COMMENT 21
175
- runs-on: ubuntu-latest
176
- steps:
177
- - name: Fake Job
178
- run: |
179
- echo "Running fake job"
180
-
181
- # =============================================================================
182
- # TAG & CREATE PR
183
- # =============================================================================
184
- tag:
185
- # =============================================================================
186
- # TAG & CREATE PR
187
- # =============================================================================
188
- if: github.ref_name == 'alpha'
189
- needs: version
190
- runs-on: ubuntu-latest
191
- steps:
192
- - uses: ./.github/actions/create-tag
193
- with:
194
- version: ${{ needs.version.outputs.nextVersion }}
195
-
196
- # USER COMMENT 22
197
-
198
- fake-job-7:
199
- # USER COMMENT 23
200
- runs-on: ubuntu-latest
201
- steps:
202
- - name: Fake Job
203
- run: |
204
- echo "Running fake job"
205
-
206
- createpr:
207
- ## SHOULD BE ANY BRANCH EXCEPT the final branch
208
- if: github.ref_name != 'epsilon'
209
- needs: tag
210
- runs-on: ubuntu-latest
211
- steps:
212
- - uses: ./.github/actions/create-pr
213
- with:
214
- sourceBranch: ${{ github.ref_name }}
215
- targetBranch: ${{ github.ref_name == 'alpha' && 'beta' || github.ref_name ==
216
- 'beta' && 'gamma' || github.ref_name == 'gamma' && 'delta' ||
217
- github.ref_name == 'delta' && 'epsilon' || github.ref_name ==
218
- 'epsilon' && 'epsilon' || 'epsilon' }}
219
- title: 'Release ${{ needs.version.outputs.nextVersion }}'
220
- body: 'Automated release PR for version ${{ needs.version.outputs.nextVersion
221
- }}'
222
-
223
- branch:
224
- ## SHOULD BE THE NEXT BRANCH
225
- needs: createpr
226
- runs-on: ubuntu-latest
227
- steps:
228
- - uses: ./.github/actions/manage-branch
229
- with:
230
- action: 'fast-forward'
231
- targetBranch: ${{ github.ref_name == 'alpha' && 'beta' || github.ref_name ==
232
- 'beta' && 'gamma' || github.ref_name == 'gamma' && 'delta' ||
233
- github.ref_name == 'delta' && 'epsilon' || github.ref_name ==
234
- 'epsilon' && 'epsilon' || 'epsilon' }}
235
- sourceBranch: ${{ github.ref_name }}
236
-
237
- # USER COMMENT 24
238
-
239
- fake-job-8:
240
- # USER COMMENT 25
241
- runs-on: ubuntu-latest
242
- steps:
243
- - name: Fake Job
244
- run: |
245
- echo "Running fake job"