Lambda Release #22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Lambda Release | |
| on: | |
| workflow_run: | |
| workflows: ["Release"] | |
| types: | |
| - completed | |
| workflow_dispatch: | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| repository-projects: write | |
| steps: | |
| - uses: ruby/setup-ruby@8d27f39a5e7ad39aebbcbd1324f7af020229645c # tag v1.287.0 | |
| with: | |
| ruby-version: 3.4 | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| - run: bundle install | |
| - name: Set agent version | |
| run: echo "agent_version=$(bundle exec rake newrelic:version:current)" >> $GITHUB_ENV | |
| - name: Create release tags for Lambda and K8s Init Containers | |
| run: | | |
| RELEASE_TITLE="New Relic Ruby Agent v${{ env.agent_version }}.0" | |
| RELEASE_TAG="v${{ env.agent_version }}.0_ruby" | |
| RELEASE_NOTES="Automated release for [Ruby Agent v${{ env.agent_version }}](https://github.com/newrelic/newrelic-ruby-agent/releases/tag/${{ env.agent_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}" | |
| 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 }} |