v5.28.0 #26
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: 'Publish release' | |
on: | |
release: | |
types: | |
- released | |
jobs: | |
Publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Retrieve version | |
id: retrieveVersion | |
run: echo "version=$(echo ${{ github.event.release.name }} | cut -c 2-)" >> $GITHUB_OUTPUT | |
- name: Download release artifacts | |
run: | | |
mkdir artifacts | |
echo '${{ toJSON(github.event.release.assets.*.browser_download_url) }}' | jq '.[]' | xargs wget --directory-prefix artifacts | |
- name: Import Secrets | |
id: secrets | |
uses: hashicorp/vault-action@v3.0.0 | |
with: | |
url: ${{ secrets.VAULT_ADDR }} | |
method: approle | |
roleId: ${{ secrets.VAULT_ROLE_ID }} | |
secretId: ${{ secrets.VAULT_SECRET_ID }} | |
exportEnv: false | |
secrets: | | |
secret/data/common/jenkins/downloads-camunda-cloud_google_sa_key DOWNLOAD_CENTER_GCLOUD_KEY_BYTES | GCP_CREDENTIALS_NAME; | |
- name: Upload artifacts to Camunda Download Center | |
uses: camunda/infra-global-github-actions/download-center-upload@bd506eede2ac7028cd90c8835f5d04d583ce9f01 | |
with: | |
gcp_credentials: ${{ steps.secrets.outputs.GCP_CREDENTIALS_NAME }} | |
env: 'prod' | |
version: ${{ steps.retrieveVersion.outputs.version }} | |
artifact_file: 'artifacts/*' | |
Post-Failure: | |
needs: Publish | |
if: failure() | |
runs-on: ubuntu-latest | |
steps: | |
- name: Post to a Slack channel | |
uses: slackapi/slack-github-action@v1.15.0 | |
with: | |
channel-id: ${{ secrets.SLACK_CHANNEL_ID }} | |
slack-message: "Failed to upload release. <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|Go to the build.>" | |
env: | |
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} |