Skip to content

Commit 4fb0b66

Browse files
authored
fix: create tags for all nested modules (#31)
1 parent 563a1c7 commit 4fb0b66

File tree

2 files changed

+10
-14
lines changed

2 files changed

+10
-14
lines changed

.github/workflows/release.lib.yaml

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -77,21 +77,12 @@ jobs:
7777
git tag -a "${{ env.version }}" -m "Release ${{ env.version }}"
7878
git push origin "${{ env.version }}"
7979
80-
- name: Create Git tag for api submodule
81-
if: ${{ env.SKIP != 'true' }}
82-
run: |
83-
AUTHOR_NAME=$(git log -1 --pretty=format:'%an')
84-
AUTHOR_EMAIL=$(git log -1 --pretty=format:'%ae')
85-
echo "Tagging as $AUTHOR_NAME <$AUTHOR_EMAIL>"
86-
87-
echo "AUTHOR_NAME=$AUTHOR_NAME" >> $GITHUB_ENV
88-
echo "AUTHOR_EMAIL=$AUTHOR_EMAIL" >> $GITHUB_ENV
89-
90-
git config user.name "$AUTHOR_NAME"
91-
git config user.email "$AUTHOR_EMAIL"
80+
NESTED_GO_MODULES="$(task release:list-nested-modules)"
9281
93-
git tag -a "api/${{ env.version }}" -m "Release ${{ env.version }}"
94-
git push origin "api/${{ env.version }}"
82+
for MODULE in $NESTED_GO_MODULES; do
83+
git tag -a "${{MODULE}}/${{ env.version }}" -m "Release ${{ env.version }}"
84+
git push origin "${{MODULE}}/${{ env.version }}"
85+
done
9586
9687
- name: Build Changelog
9788
id: github_release

tasks_rls.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,3 +134,8 @@ tasks:
134134
cmds:
135135
- '{{.TASKFILE_DIR2}}/sed.sh -E "s@ {{.MODULE_NAME}}/{{.MODULE}} .*@ {{.MODULE_NAME}}/{{.MODULE}} {{.VERSION}}@" "{{.ROOT_DIR2}}/go.mod"'
136136
internal: true
137+
138+
list-nested-modules:
139+
desc: "List all nested modules in the project."
140+
cmds:
141+
- cmd: 'echo "{{.NESTED_MODULES}}"'

0 commit comments

Comments
 (0)