Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref(serverless): Improve saving SDK version in GitHub action #5100

Merged
merged 2 commits into from
May 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,9 @@ jobs:
- name: Save SDK version for later
run: |
echo "Saving SDK_VERSION for later"
export SDK_VERSION=$(cat packages/core/src/version.ts | cut -f5 -d' ' | tr -d "'" | tr -d ";")
echo $SDK_VERSION > dist-serverless/version
cat packages/core/src/version.ts | awk -F"'" '{print $2}' > dist-serverless/version
[ -z $(cat dist-serverless/version) ] && echo "Version extraction failed" && exit 1

outputs:
# this needs to be passed on, because the `needs` context only looks at direct ancestors (so steps which depend on
# `job_build` can't see `job_install_deps` and what it returned)
Expand Down Expand Up @@ -533,8 +534,7 @@ jobs:
- name: Get SDK version
run: |
export SDK_VERSION=$(cat dist-serverless/version)
echo "SDK_VERSION=$SDK_VERSION"
echo "SDK_VERSION=$SDK_VERSION" >> $GITHUB_ENV
echo "SDK_VERSION=$SDK_VERSION" | tee -a $GITHUB_ENV
- uses: actions/upload-artifact@v3
with:
name: ${{ env.HEAD_COMMIT }}
Expand Down