run-minor-release #21
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: run-minor-release | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'The version (semver format: major.minor.0)' | |
required: true | |
type: string | |
# Avoid concurrency so we can watch the releases correctly | |
concurrency: | |
group: ${{ github.workflow }} | |
permissions: | |
contents: read | |
env: | |
JOB_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
SLACK_CHANNEL: "#apm-server" | |
GH_TOKEN: ${{ secrets.APM_SERVER_RELEASE_TOKEN }} | |
jobs: | |
prepare: | |
runs-on: ubuntu-latest | |
outputs: | |
release-branch: ${{ steps.prepare.outputs.release-branch }} | |
release-version: ${{ steps.prepare.outputs.release-version }} | |
slack-thread: ${{ steps.prepare.outputs.slack-thread }} | |
steps: | |
- uses: actions/checkout@v4 | |
- id: prepare | |
uses: ./.github/workflows/prepare-release | |
with: | |
vault-url: ${{ secrets.VAULT_ADDR }} | |
vault-role-id: ${{ secrets.VAULT_ROLE_ID }} | |
vault-secret-id: ${{ secrets.VAULT_SECRET_ID }} | |
version: ${{ inputs.version }} | |
type: 'minor' | |
run-minor: | |
runs-on: ubuntu-latest | |
needs: [ prepare ] | |
env: | |
RELEASE_BRANCH: ${{ needs.prepare.outputs.release-branch }} | |
RELEASE_VERSION: ${{ needs.prepare.outputs.release-version }} | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
# 0 indicates all history for all branches and tags. | |
fetch-depth: 0 | |
# Required to use a service account, otherwise PRs created by | |
# GitHub bot won't trigger any CI builds. | |
# See https://github.com/peter-evans/create-pull-request/issues/48#issuecomment-537478081 | |
- name: Configure git user | |
uses: elastic/apm-pipeline-library/.github/actions/setup-git@current | |
with: | |
token: ${{ env.GH_TOKEN }} | |
- name: Import GPG key | |
uses: crazy-max/ghaction-import-gpg@01dd5d3ca463c7f10f7f4f7b4f177225ac661ee4 # v6.1.0 | |
with: | |
gpg_private_key: ${{ secrets.APM_SERVER_RELEASE_GPG_PRIVATE_KEY }} | |
passphrase: ${{ secrets.APM_SERVER_RELEASE_PASSPHRASE }} | |
git_user_signingkey: true | |
git_commit_gpgsign: true | |
git_push_gpgsign: true | |
- run: make minor-release |