Skip to content

Commit

Permalink
Separate release workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
hannahramadan committed Jan 29, 2025
1 parent b4128d4 commit 08cffb8
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 13 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/lambda_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Release

on:
push:
branches:
- main
workflow_dispatch:

jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
repository-projects: write
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # tag v4.1.7
with:
fetch-depth: 0

- uses: ruby/setup-ruby@4a9ddd6f338a97768b8006bf671dfbad383215f4 # tag v1.207.0
with:
ruby-version: 3.4

- 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})"
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}
echo "newrelic/newrelic-agent-init-container - Releasing ${RELEASE_TITLE} with tag ${RELEASE_TAG}"
gh release create "${RELEASE_TAG}" --title=${RELEASE_TITLE} --repo=newrelic/newrelic-agent-init-container --notes=${RELEASE_NOTES}
env:
GH_RELEASE_TOKEN: ${{ secrets.GH_RELEASE_TOKEN }}
13 changes: 0 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,3 @@ jobs:

- name: Publish newrelic-infinite_tracing to rubygems.org
run: ruby ./.github/workflows/scripts/rubygems-publish.rb infinite_tracing/newrelic-infinite_tracing

- 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})"
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}
echo "newrelic/newrelic-agent-init-container - Releasing ${RELEASE_TITLE} with tag ${RELEASE_TAG}"
gh release create "${RELEASE_TAG}" --title=${RELEASE_TITLE} --repo=newrelic/newrelic-agent-init-container --notes=${RELEASE_NOTES}
env:
GH_RELEASE_TOKEN: ${{ secrets.GH_RELEASE_TOKEN }}

0 comments on commit 08cffb8

Please sign in to comment.