Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 21 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,36 @@
---
name: sonar-release
# This workflow is triggered when publishing a new github release
# yamllint disable-line rule:truthy
on:
release:
types:
- published
workflow_dispatch:
Comment thread
emma44-m marked this conversation as resolved.
inputs:
version:
description: 'Full version including build number, e.g. 1.2.3.456'
required: true
Comment thread
emma44-m marked this conversation as resolved.

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false

jobs:
guard:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is the only repository where we are enforcing this.

runs-on: ubuntu-latest
steps:
- name: Enforce eligible release branches
run: |
[[ "${GITHUB_REF_NAME}" == "master" || "${GITHUB_REF_NAME}" == branch-* ]] || \
{ echo "ERROR: must trigger from 'master' or 'branch-*', got '${GITHUB_REF_NAME}'"; exit 1; }

release:
needs: guard
permissions:
id-token: write
contents: write
Comment thread
emma44-m marked this conversation as resolved.
uses: SonarSource/gh-action_release/.github/workflows/main.yaml@v6
uses: SonarSource/gh-action_release/.github/workflows/main.yaml@v7
with:
publishToBinaries: true # disabled by default
mavenCentralSync: true # disabled by default
mavenCentralSyncExclusions: "*echo*"
slackChannel: squad-sq-platform-build-notification
version: ${{ inputs.version }}
createDraftRelease: false
Loading