Skip to content

Commit 7c0f23c

Browse files
authored
Merge pull request #9856 from camptocamp/backport/9854-to-2.7
[Backport 2.7] Fix the publish from ngeo
2 parents eb776e0 + 68c3211 commit 7c0f23c

File tree

4 files changed

+43
-30
lines changed

4 files changed

+43
-30
lines changed

.github/workflows/main.yaml

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,6 @@ jobs:
5555
- name: Checks
5656
run: c2cciutils-checks
5757

58-
- run: scripts/get-version --auto-increment --github
59-
id: version
60-
6158
- run: python3 -m pip install --user --requirement=requirements.txt
6259

6360
# Build images
@@ -161,6 +158,13 @@ jobs:
161158
if: failure()
162159
continue-on-error: True
163160

161+
- run: git pull --ff-only origin ${{ env.MAIN_BRANCH }}
162+
if: >
163+
github.ref == format('refs/heads/{0}', env.MAIN_BRANCH)
164+
&& env.HAS_SECRETS == 'HAS_SECRETS'
165+
- run: scripts/get-version --auto-increment --github
166+
id: version
167+
164168
# Test Upgrade
165169
- run: DOCKER_TAG=${{ steps.version.outputs.full }} make build-tools
166170
- run: DOCKER_TAG=${{ steps.version.outputs.full }} make build-runner
@@ -182,12 +186,24 @@ jobs:
182186
- run: ci/create-new-project ${HOME}/workspace geomapfishapp
183187
- run: (cd ${HOME}/workspace/geomapfishapp/; ./build)
184188

185-
- name: 'Update the changelog'
189+
- name: Update the changelog
186190
run: ci/changelog ${{ steps.version.outputs.full }}
187191
env:
188192
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
189193
- run: git diff CHANGELOG.md
190194

195+
- name: Push version and changelog
196+
run: |
197+
set -eux
198+
git add ci/ci.yaml ci/changelog.yaml CHANGELOG.md
199+
git diff --staged --quiet || (\
200+
git commit -m "[skip ci] Update the minor version"; \
201+
git push origin HEAD:${{ env.MAIN_BRANCH }} \
202+
)
203+
if: >
204+
github.ref == format('refs/heads/{0}', env.MAIN_BRANCH)
205+
&& env.HAS_SECRETS == 'HAS_SECRETS'
206+
191207
- name: Publish feature branch
192208
run: |
193209
c2cciutils-publish
@@ -204,18 +220,6 @@ jobs:
204220
github.ref == format('refs/heads/{0}', env.MAIN_BRANCH)
205221
&& env.HAS_SECRETS == 'HAS_SECRETS'
206222
207-
- name: Push version and changelog
208-
run: |
209-
set -eux
210-
git add ci/ci.yaml ci/changelog.yaml CHANGELOG.md
211-
git diff --staged --quiet || (\
212-
git commit -m "[skip ci] Update the minor version"; \
213-
git push origin HEAD:${{ env.MAIN_BRANCH }} \
214-
)
215-
if: >
216-
github.ref == format('refs/heads/{0}', env.MAIN_BRANCH)
217-
&& env.HAS_SECRETS == 'HAS_SECRETS'
218-
219223
- name: Notify demo
220224
run: >
221225
curl --request POST --header "Content-Type: application/json"

.github/workflows/ngeo-25.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,10 @@ jobs:
132132
# Test App
133133
- run: ci/test-app
134134

135+
- run: git pull --ff-only origin ${{ env.MAIN_BRANCH }}
136+
- run: scripts/get-version --auto-increment --github
137+
id: version
138+
135139
# Test Upgrade
136140
- run: DOCKER_TAG=${{ steps.version.outputs.full }} make build-tools
137141
- run: DOCKER_TAG=${{ steps.version.outputs.full }} make build-runner
@@ -175,6 +179,11 @@ jobs:
175179
HEAD:${{ env.MAIN_BRANCH }}
176180
)
177181
182+
- name: Publish version branch
183+
run: |
184+
c2cciutils-publish --type=version_branch --version=${{ steps.version.outputs.major }}
185+
c2cciutils-publish --group=full --type=version_branch --version=${{ steps.version.outputs.full }}
186+
178187
- name: Notify demo
179188
run: >
180189
curl --request POST --header "Content-Type: application/json"

.github/workflows/ngeo-26.yaml

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@ jobs:
3939
- name: Checks
4040
run: c2cciutils-checks
4141

42-
- run: scripts/get-version --force-increment --github
43-
id: version
44-
4542
- run: python3 -m pip install --user --requirement=requirements.txt
4643

4744
# Global simple lint
@@ -144,6 +141,10 @@ jobs:
144141
if: failure()
145142
continue-on-error: True
146143
144+
- run: git pull --ff-only origin ${{ env.MAIN_BRANCH }}
145+
- run: scripts/get-version --force-increment --github
146+
id: version
147+
147148
# Test Upgrade
148149
- run: DOCKER_TAG=${{ steps.version.outputs.full }} make build-tools
149150
- run: DOCKER_TAG=${{ steps.version.outputs.full }} make build-runner
@@ -165,21 +166,12 @@ jobs:
165166
- run: ci/create-new-project ${HOME}/workspace geomapfishapp
166167
- run: (cd ${HOME}/workspace/geomapfishapp/; ./build)
167168

168-
- name: 'Update the changelog'
169+
- name: Update the changelog
169170
run: ci/changelog ${{ steps.version.outputs.full }}
170171
env:
171172
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
172173
- run: git diff CHANGELOG.md
173174

174-
- name: Publish feature branch
175-
run: |
176-
c2cciutils-publish
177-
c2cciutils-publish --group=full
178-
- name: Publish version branch
179-
run: |
180-
c2cciutils-publish --type=version_branch --version=${{ steps.version.outputs.major }}
181-
c2cciutils-publish --group=full --type=version_branch --version=${{ steps.version.outputs.full }}
182-
183175
- name: Push version and changelog
184176
run: |
185177
set -eux
@@ -189,6 +181,11 @@ jobs:
189181
git push origin HEAD:${{ env.MAIN_BRANCH }} \
190182
)
191183
184+
- name: Publish version branch
185+
run: |
186+
c2cciutils-publish --type=version_branch --version=${{ steps.version.outputs.major }}
187+
c2cciutils-publish --group=full --type=version_branch --version=${{ steps.version.outputs.full }}
188+
192189
- name: Notify demo
193190
run: >
194191
curl --request POST --header "Content-Type: application/json"

doc/developer/build_release.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ On ``c2cgeoportal`` copy the file ``.github/workflows/main.yaml`` from new versi
138138
- - name: Publish version branch
139139
- ...
140140
141-
- - name: 'Update the changelog'
141+
- - name: Update the changelog
142142
- ...
143143
- - run: git diff CHANGELOG.md
144144
@@ -228,6 +228,9 @@ On ``c2cgeoportal`` copy the file ``.github/workflows/main.yaml`` from new versi
228228
+ with:
229229
+ ref: ${{ env.MAIN_BRANCH }}
230230
231+
- - name: Publish feature branch
232+
- ...
233+
-
231234
- - name: Publish to Transifex
232235
- ...
233236
-

0 commit comments

Comments
 (0)