From 32f29cc9a692fe9635e45d65f38182b3297792de Mon Sep 17 00:00:00 2001 From: Hannah Ramadan Date: Wed, 29 Jan 2025 14:50:05 -0800 Subject: [PATCH 1/4] Use version --- .github/workflows/lambda_release.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lambda_release.yml b/.github/workflows/lambda_release.yml index 9a4df2166e..c97291d6eb 100644 --- a/.github/workflows/lambda_release.yml +++ b/.github/workflows/lambda_release.yml @@ -21,11 +21,15 @@ jobs: with: ruby-version: 3.4 + - name: Determine version + run: | + echo "VERSION=$(ls newrelic_rpm-*.gem | ruby -pe 'sub(/newrelic_rpm\-(.*).gem/, "\\1")')" >> $GITHUB_ENV + - name: Create release tags for Lambda and K8s Init Containers run: | - RELEASE_TITLE="New Relic Ruby Agent ${GITHUB_REF}.0" - RELEASE_TAG="${GITHUB_REF}.0_ruby" - RELEASE_NOTES="Automated release for [Ruby Agent ${GITHUB_REF}](https://github.com/newrelic/newrelic-ruby-agent/releases/tag/${GITHUB_REF})" + RELEASE_TITLE="New Relic Ruby Agent ${{ env.VERSION }}.0" + RELEASE_TAG="${{ env.VERSION }}.0_ruby" + RELEASE_NOTES="Automated release for [Ruby Agent ${{ env.VERSION }}](https://github.com/newrelic/newrelic-ruby-agent/releases/tag/${GITHUB_REF})" gh auth login --with-token <<< $GH_RELEASE_TOKEN echo "newrelic/newrelic-lambda-layers - Releasing ${RELEASE_TITLE} with tag ${RELEASE_TAG}" gh release create "${RELEASE_TAG}" --title=${RELEASE_TITLE} --repo=newrelic/newrelic-lambda-layers --notes=${RELEASE_NOTES} From 51c9333ec41b9471ac681fc3fb4a28968c5a7618 Mon Sep 17 00:00:00 2001 From: Hannah Ramadan <76922290+hannahramadan@users.noreply.github.com> Date: Wed, 29 Jan 2025 14:53:52 -0800 Subject: [PATCH 2/4] Update .github/workflows/lambda_release.yml Co-authored-by: Kayla Reopelle <87386821+kaylareopelle@users.noreply.github.com> --- .github/workflows/lambda_release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lambda_release.yml b/.github/workflows/lambda_release.yml index c97291d6eb..4768fffb66 100644 --- a/.github/workflows/lambda_release.yml +++ b/.github/workflows/lambda_release.yml @@ -29,7 +29,7 @@ jobs: run: | RELEASE_TITLE="New Relic Ruby Agent ${{ env.VERSION }}.0" RELEASE_TAG="${{ env.VERSION }}.0_ruby" - RELEASE_NOTES="Automated release for [Ruby Agent ${{ env.VERSION }}](https://github.com/newrelic/newrelic-ruby-agent/releases/tag/${GITHUB_REF})" + RELEASE_NOTES="Automated release for [Ruby Agent ${{ env.VERSION }}](https://github.com/newrelic/newrelic-ruby-agent/releases/tag/${env.VERSION})" gh auth login --with-token <<< $GH_RELEASE_TOKEN echo "newrelic/newrelic-lambda-layers - Releasing ${RELEASE_TITLE} with tag ${RELEASE_TAG}" gh release create "${RELEASE_TAG}" --title=${RELEASE_TITLE} --repo=newrelic/newrelic-lambda-layers --notes=${RELEASE_NOTES} From 1c0f48b394ea8853bffa37693782746f21764263 Mon Sep 17 00:00:00 2001 From: Hannah Ramadan Date: Wed, 29 Jan 2025 15:05:05 -0800 Subject: [PATCH 3/4] Build gem for version --- .github/workflows/lambda_release.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/lambda_release.yml b/.github/workflows/lambda_release.yml index 4768fffb66..9872f44529 100644 --- a/.github/workflows/lambda_release.yml +++ b/.github/workflows/lambda_release.yml @@ -21,6 +21,9 @@ jobs: with: ruby-version: 3.4 + - name: Build newrelic_rpm gem + run: gem build newrelic_rpm.gemspec + - name: Determine version run: | echo "VERSION=$(ls newrelic_rpm-*.gem | ruby -pe 'sub(/newrelic_rpm\-(.*).gem/, "\\1")')" >> $GITHUB_ENV From f9631a1adf38c591036e6595be309a6ebf09c6fe Mon Sep 17 00:00:00 2001 From: Hannah Ramadan Date: Wed, 29 Jan 2025 15:06:20 -0800 Subject: [PATCH 4/4] Build name --- .github/workflows/lambda_release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lambda_release.yml b/.github/workflows/lambda_release.yml index 9872f44529..09fc15b07d 100644 --- a/.github/workflows/lambda_release.yml +++ b/.github/workflows/lambda_release.yml @@ -32,7 +32,7 @@ jobs: run: | RELEASE_TITLE="New Relic Ruby Agent ${{ env.VERSION }}.0" RELEASE_TAG="${{ env.VERSION }}.0_ruby" - RELEASE_NOTES="Automated release for [Ruby Agent ${{ env.VERSION }}](https://github.com/newrelic/newrelic-ruby-agent/releases/tag/${env.VERSION})" + RELEASE_NOTES="Automated release for [Ruby Agent ${{ env.VERSION }}](https://github.com/newrelic/newrelic-ruby-agent/releases/tag/${{ env.VERSION }})" gh auth login --with-token <<< $GH_RELEASE_TOKEN echo "newrelic/newrelic-lambda-layers - Releasing ${RELEASE_TITLE} with tag ${RELEASE_TAG}" gh release create "${RELEASE_TAG}" --title=${RELEASE_TITLE} --repo=newrelic/newrelic-lambda-layers --notes=${RELEASE_NOTES}