Skip to content

Commit

Permalink
Adding nested modules to release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
merschformann committed Mar 19, 2024
1 parent f277781 commit 514bb13
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
33 changes: 32 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ jobs:
exit 1
fi
fi
- name: configure git with the bot credentials
- name: configure git and clone
run: |
mkdir -p ~/.ssh
ssh-keyscan github.com >> ~/.ssh/known_hosts
Expand All @@ -58,12 +59,42 @@ jobs:
git rev-parse --short HEAD
- name: determine Go version
run: |
export GO_VERSION=$(cat .github/workflows/workflow-configuration.yml | yq '.go-version' -r)
echo "Using Go version $GO_VERSION"
working-directory: ./sdk

- name: set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}

- name: push release tag
run: |
git tag -s $VERSION -m "Release $VERSION"
git push origin $VERSION
working-directory: ./sdk

- name: bump and tag nested modules
run: |
export MODULES=$(cat .github/workflows/workflow-configuration.yml | yq '.nested_modules[]' -r)
for module in $MODULES; do
echo "Bumping $module to $VERSION"
pushd $module
go get github.com/nextmv-io/sdk@$VERSION
go mod tidy
popd
done
git add go.mod go.sum
git commit -m "Bump sdk to $VERSION"
git push
for module in $MODULES; do
git tag -s $module/$VERSION -m "Release $module/$VERSION"
git push origin $module/$VERSION
done
working-directory: ./sdk

- name: create release
run: |
PRERELEASE_FLAG=""
Expand Down
9 changes: 9 additions & 0 deletions workflow-configuration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Supported language versions.
go-version: 1.22

# All nested modules that also have to be released.
nested_modules:
- measure/routingkit
- measure/osrm
- measure/google
- measure/here

0 comments on commit 514bb13

Please sign in to comment.