Skip to content

Commit cc06f9d

Browse files
committed
fix(gitlab-ci,github-actions/release): Fix Git submodules not included in the release archive
Signed-off-by: 林博仁(Buo-ren Lin) <[email protected]>
1 parent 9159f5e commit cc06f9d

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

.github/workflows/release.yml

+11
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ jobs:
2929
# WORKAROUND: Adding this option triggers actions/checkout#1467
3030
#fetch-tags: true
3131

32+
# Also recursively fetch submodules
33+
# WORKAROUND: Adding this option triggers actions/checkout#1959
34+
#submodules: true
35+
3236
- name: >-
3337
WORKAROUND: Fetch tags that points to the revisions
3438
checked-out(actions/checkout#1467)
@@ -40,6 +44,13 @@ jobs:
4044
--depth=100 \
4145
--no-recurse-submodules
4246
47+
- name: >-
48+
WORKAROUND: Checkout submodules recursively(actions/checkout#1959)
49+
run: |-
50+
git submodule update \
51+
--init \
52+
--recursive
53+
4354
- name: Determine the project identifier
4455
run: printf "project_id=${GITHUB_REPOSITORY##*/}\\n" >> $GITHUB_ENV
4556

.gitlab-ci.yml

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
#
88
# Copyright 2024 林博仁(Buo-ren Lin) <[email protected]>
99
# SPDX-License-Identifier: CC-BY-SA-4.0 OR LicenseRef-Apache-2.0-If-Not-Used-In-Template-Projects
10+
variables:
11+
GIT_SUBMODULE_STRATEGY: recursive
12+
1013
do-static-analysis:
1114
stage: test
1215
rules:

0 commit comments

Comments
 (0)