Prerelease 9.15.0-pre #433
This file contains 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: Create Release PR | |
on: | |
pull_request: | |
types: | |
- closed | |
jobs: | |
create_prerelease: | |
if: ${{ (github.event.pull_request.merged == true) && (contains(github.event.pull_request.labels.*.name, 'prerelease')) }} | |
runs-on: ubuntu-22.04 | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- name: Install Ruby 3.3 | |
uses: ruby/setup-ruby@f26937343756480a8cb3ae1f623b9c8d89ed6984 # tag v1.196.0 | |
with: | |
ruby-version: 3.3 | |
- name: Checkout code | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # tag v4.1.7 | |
- run: bundle | |
- name: Set agent version | |
run: echo "agent_version=$(bundle exec rake newrelic:version:current)" >> $GITHUB_ENV | |
- name: Create pull request | |
run: gh pr create --draft --base "main" --title "$TITLE" --body "$BODY" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
TITLE: "Release ${{ env.agent_version }}" | |
BODY: "Automated PR for ${{ env.agent_version}} release" |