name: Continuous Integration on release

on:
    release:
        types:
            - published

jobs:
    test:
        uses: globaldigitalagency/github-workflows-templates/.github/workflows/test.yaml@v1
        secrets: inherit

    validate-bundle:
        uses: globaldigitalagency/github-workflows-templates/.github/workflows/validate-bundle.yaml@v1
        secrets: inherit
        with:
            project: gda/autoadmin
            version: ${{ github.event.release.tag_name }}
    analysis:
        needs: test
        uses: globaldigitalagency/github-workflows-templates/.github/workflows/sonarqube.yaml@v1
        secrets: inherit
        with:
            reference-branch: ${{ github.event.release.target_commitish }}
            branch: ${{ github.event.release.target_commitish }}
            version: ${{ github.event.release.tag_name }}
