v4.7.1 (#1433) #2
Workflow file for this run
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: release | |
on: | |
push: | |
tags: | |
- "v[0-9]+*" | |
permissions: | |
contents: write | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 2.6 | |
- uses: hashicorp/[email protected] | |
with: | |
url: ${{ secrets.VAULT_ADDR }} | |
method: approle | |
roleId: ${{ secrets.VAULT_ROLE_ID }} | |
secretId: ${{ secrets.VAULT_SECRET_ID }} | |
secrets: | | |
secret/apm-team/ci/apm-agent-ruby-rubygems-release apiKey | API_KEY ; | |
- name: RubyGems login | |
run: | | |
RUBY_HOME="${HOME}/.gem" | |
RUBY_CREDENTIALS_FILE="${RUBY_HOME}/credentials" | |
mkdir -p "${RUBY_HOME}" | |
echo '---' > "${RUBY_CREDENTIALS_FILE}" | |
echo ":rubygems_api_key: ${API_KEY}" >> "${RUBY_CREDENTIALS_FILE}" | |
chmod 0600 "${RUBY_CREDENTIALS_FILE}" | |
- name: Install build system | |
run: .ci/scripts/install-build-system.sh | |
- run: rake release | |
update-branch: | |
needs: | |
- release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 2.6 | |
- name: Setup Git | |
uses: elastic/apm-pipeline-library/.github/actions/setup-git@current | |
- name: Install build system | |
run: .ci/scripts/install-build-system.sh | |
- run: rake release:update_branch | |
status: | |
if: always() | |
runs-on: ubuntu-latest | |
needs: | |
- release | |
- update-branch | |
steps: | |
- id: check | |
uses: elastic/apm-pipeline-library/.github/actions/check-dependent-jobs@current | |
with: | |
needs: ${{ toJSON(needs) }} | |
- run: ${{ steps.check.outputs.isSuccess }} | |
- if: always() | |
uses: elastic/apm-pipeline-library/.github/actions/notify-build-status@current | |
with: | |
vaultUrl: ${{ secrets.VAULT_ADDR }} | |
vaultRoleId: ${{ secrets.VAULT_ROLE_ID }} | |
vaultSecretId: ${{ secrets.VAULT_SECRET_ID }} | |
slackChannel: "#apm-agent-ruby" |