File tree Expand file tree Collapse file tree 5 files changed +49
-54
lines changed
[% if repo_platform == 'gitlab' or repo_platform == 'gitlab-self-managed' %].gitlab[% endif %]/workflows Expand file tree Collapse file tree 5 files changed +49
-54
lines changed Original file line number Diff line number Diff line change @@ -43,3 +43,17 @@ consistency:
43
43
- git status --porcelain
44
44
- test -z "$(git status --porcelain)"
45
45
stage : ci
46
+ semantic-release :
47
+ image :
48
+ name : node:20.13.1
49
+ interruptible : true
50
+ rules :
51
+ - if : $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "push" && $CI_PROJECT_NAMESPACE == "serious-scaffold" && $CI_PROJECT_NAME == "ss-python"
52
+ script :
53
+ - >
54
+ npx
55
+ -p @semantic-release/gitlab@13
56
+ -p conventional-changelog-conventionalcommits@7
57
+ -p semantic-release@23
58
+ semantic-release
59
+ stage : release
Original file line number Diff line number Diff line change @@ -2,8 +2,6 @@ pages-build:
2
2
artifacts :
3
3
paths :
4
4
- public
5
- - docs/changelog.md
6
- - release-notes.md
7
5
cache :
8
6
paths :
9
7
- .venv
@@ -17,26 +15,22 @@ pages-build:
17
15
script :
18
16
- make dev-doc
19
17
- make doc
20
- - make release-notes > release-notes.md
21
18
stage : release
22
- release-publish :
23
- image : registry.gitlab.com/gitlab-org/release-cli:v0.18.0@sha256:696013aea0f2a20482800ce3a77341f840d7c7ec17bd78bd555e0bd6c00e4f11
19
+ pages :
20
+ artifacts :
21
+ paths :
22
+ - public
24
23
needs :
25
24
- pages-build
26
- release :
27
- description : release-notes.md
28
- tag_name : $CI_COMMIT_TAG
29
25
rules :
30
26
- if : $CI_COMMIT_TAG =~ /^v?(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-?(a|b|rc)(0|[1-9][0-9]*)?)?$/
31
27
script :
32
- - echo "Running the release job."
28
+ - echo "Running the pages job."
33
29
stage : release
34
30
variables :
35
31
GIT_STRATEGY : none
36
32
container-publish :
37
33
image : docker:26.1.2@sha256:c890c327e515cdccd14e593fb5450e4375e791ab0520795948134cb87b45aaa7
38
- needs :
39
- - release-publish
40
34
parallel :
41
35
matrix :
42
36
- PYTHON_VERSION :
@@ -82,24 +76,8 @@ container-publish:
82
76
PYTHON_VERSION : ${PYTHON_VERSION}
83
77
SOURCE_DATE_EPOCH : 0
84
78
package-publish :
85
- needs :
86
- - release-publish
87
79
rules :
88
80
- if : $CI_COMMIT_TAG =~ /^v?(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-?(a|b|rc)(0|[1-9][0-9]*)?)?$/
89
81
script :
90
82
- make publish
91
83
stage : release
92
- pages :
93
- artifacts :
94
- paths :
95
- - public
96
- needs :
97
- - pages-build
98
- - release-publish
99
- rules :
100
- - if : $CI_COMMIT_TAG =~ /^v?(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-?(a|b|rc)(0|[1-9][0-9]*)?)?$/
101
- script :
102
- - echo "Running the pages job."
103
- stage : release
104
- variables :
105
- GIT_STRATEGY : none
Original file line number Diff line number Diff line change @@ -56,3 +56,17 @@ consistency:
56
56
- test -z "$(git status --porcelain)"
57
57
stage: ci
58
58
[%- endif %]
59
+ semantic-release:
60
+ image:
61
+ name: node:20.13.1
62
+ interruptible: true
63
+ rules:
64
+ - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "push" && $CI_PROJECT_NAMESPACE == "{{ repo_namespace }}" && $CI_PROJECT_NAME == "{{ repo_name }}"
65
+ script:
66
+ - >
67
+ npx
68
+ -p @semantic-release/gitlab@13
69
+ -p conventional-changelog-conventionalcommits@7
70
+ -p semantic-release@23
71
+ semantic-release
72
+ stage: release
Original file line number Diff line number Diff line change @@ -3,8 +3,6 @@ pages-build:
3
3
artifacts:
4
4
paths:
5
5
- public
6
- - docs/changelog.md
7
- - release-notes.md
8
6
cache:
9
7
paths:
10
8
- .venv
@@ -18,26 +16,22 @@ pages-build:
18
16
script:
19
17
- make dev-doc
20
18
- make doc
21
- - make release-notes > release-notes.md
22
19
stage: release
23
- release-publish:
24
- image: registry.gitlab.com/gitlab-org/release-cli:v0.18.0@sha256:696013aea0f2a20482800ce3a77341f840d7c7ec17bd78bd555e0bd6c00e4f11
20
+ pages:
21
+ artifacts:
22
+ paths:
23
+ - public
25
24
needs:
26
25
- pages-build
27
- release:
28
- description: release-notes.md
29
- tag_name: $CI_COMMIT_TAG
30
26
rules:
31
27
- if: $CI_COMMIT_TAG =~ /^v?(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-?(a|b|rc)(0|[1-9][0-9]*)?)?$/
32
28
script:
33
- - echo "Running the release job."
29
+ - echo "Running the pages job."
34
30
stage: release
35
31
variables:
36
32
GIT_STRATEGY: none
37
33
container-publish:
38
34
image: docker:26.1.2@sha256:c890c327e515cdccd14e593fb5450e4375e791ab0520795948134cb87b45aaa7
39
- needs:
40
- - release-publish
41
35
parallel:
42
36
matrix:
43
37
- PYTHON_VERSION:
@@ -93,24 +87,8 @@ container-publish:
93
87
PYTHON_VERSION: ${PYTHON_VERSION}
94
88
SOURCE_DATE_EPOCH: 0
95
89
package-publish:
96
- needs:
97
- - release-publish
98
90
rules:
99
91
- if: $CI_COMMIT_TAG =~ /^v?(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-?(a|b|rc)(0|[1-9][0-9]*)?)?$/
100
92
script:
101
93
- make publish
102
94
stage: release
103
- pages:
104
- artifacts:
105
- paths:
106
- - public
107
- needs:
108
- - pages-build
109
- - release-publish
110
- rules:
111
- - if: $CI_COMMIT_TAG =~ /^v?(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-?(a|b|rc)(0|[1-9][0-9]*)?)?$/
112
- script:
113
- - echo "Running the pages job."
114
- stage: release
115
- variables:
116
- GIT_STRATEGY: none
Original file line number Diff line number Diff line change 118
118
}
119
119
}
120
120
],
121
+ [%- if repo_platform == 'github' %]
121
122
"@semantic-release/github"
123
+ [%- elif repo_platform == 'gitlab' %]
124
+ "@semantic-release/gitlab"
125
+ [%- elif repo_platform == 'gitlab-self-managed' %]
126
+ [
127
+ "@semantic-release/gitlab",
128
+ {
129
+ "gitlabUrl": "https://{{ repo_host }}"
130
+ }
131
+ ]
132
+ [%- endif %]
122
133
],
123
134
"preset": "conventionalcommits"
124
135
}
You can’t perform that action at this time.
0 commit comments