Merge pull request #3459 from newrelic/dev #105
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: Release | ||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| jobs: | ||
| release: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| repository-projects: write | ||
| steps: | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag v6.0.2 | ||
| with: | ||
| fetch-depth: 0 | ||
| - uses: ruby/setup-ruby@8d27f39a5e7ad39aebbcbd1324f7af020229645c # tag v1.287.0 | ||
| with: | ||
| ruby-version: 3.4 | ||
| - name: Install onetimepass | ||
| run: pip install onetimepass==1.0.1 | ||
| - name: Configure gem credentials | ||
| run: | | ||
| echo "GEM_HOST_API_KEY=${{ secrets.RUBYGEMS_API_KEY }}" >> $GITHUB_ENV | ||
| echo "RUBYGEMS_MFA_KEY=${{ secrets.RUBYGEMS_MFA_KEY }}" >> $GITHUB_ENV | ||
| - name: Build newrelic_rpm gem | ||
| run: gem build newrelic_rpm.gemspec | ||
| - name: Build newrelic-infinite_tracing gem | ||
| run: | | ||
| cd infinite_tracing | ||
| gem build newrelic-infinite_tracing.gemspec | ||
| cd .. | ||
| - name: Determine version | ||
| run: | | ||
| echo "VERSION=$(ls newrelic_rpm-*.gem | ruby -pe 'sub(/newrelic_rpm\-(.*).gem/, "\\1")')" >> $GITHUB_ENV | ||
| - name: Create github release | ||
| uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # tag v2.5.0 | ||
| if: $(git tag -l ${{ env.VERSION }}) == false | ||
|
Check warning on line 46 in .github/workflows/release.yml
|
||
| with: | ||
| tag_name: ${{ env.VERSION }} | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Obtain OTP to publish newrelic_rpm to rubygems.org | ||
| run: echo "RUBYGEMS_OTP=$(python ./.github/workflows/scripts/rubygems-authenticate.py RUBYGEMS_MFA_KEY)" >> $GITHUB_ENV | ||
| - name: Publish newrelic_rpm to rubygems.org | ||
| run: ruby ./.github/workflows/scripts/rubygems-publish.rb newrelic_rpm | ||
| - name: Obtain OTP to publish newrelic-infinite_tracing to rubygems.org | ||
| run: echo "RUBYGEMS_OTP=$(python ./.github/workflows/scripts/rubygems-authenticate.py RUBYGEMS_MFA_KEY)" >> $GITHUB_ENV | ||
| - name: Publish newrelic-infinite_tracing to rubygems.org | ||
| run: ruby ./.github/workflows/scripts/rubygems-publish.rb infinite_tracing/newrelic-infinite_tracing | ||
| update-agent-metadata: | ||
| needs: [release] | ||
| uses: ./.github/workflows/AgentMetadata.yml | ||
| with: | ||
| version: ${{ github.event.release.tag_name }} | ||
| secrets: | ||
| FC_SYS_ID_CLIENT_ID: ${{ secrets.FC_SYS_ID_CLIENT_ID }} | ||
| FC_SYS_ID_PR_KEY: ${{ secrets.FC_SYS_ID_PR_KEY }} | ||
| APM_CONTROL_NR_LICENSE_KEY_STAGING: ${{ secrets.APM_CONTROL_NR_LICENSE_KEY_STAGING }} | ||