Allow release override

the release keyword in gitlab-ci implies glab's --no-update option.

Semantic release creates a release on tag and this component must be able to overwrite it.

  • Replace release keyword with an actual glab call.
  • Fix rules to create the publish job even on non-push tag pipelines, but in manual / allow-failure mode.

Tested here: https://gitlab.com/jonathang-sylva-experiments/forks/sylva-capi-cluster/-/jobs/18062786823

Breaking change

To add additional assets links to the release

release-notes publish:
  release:
    assets:
      links:
        - name: 'Linux amd64'
          url: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${RELEASE_NAME}/${BUILD_TAG}/${BINARY_NAME}_linux_amd64"
        - name: 'Linux arm64'
          url: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${RELEASE_NAME}/${BUILD_TAG}/${BINARY_NAME}_linux_arm64"
        - name: 'Darwin amd64'
          url: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${RELEASE_NAME}/${BUILD_TAG}/${BINARY_NAME}_darwin_amd64"
        - name: 'Darwin arm64'
          url: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${RELEASE_NAME}/${BUILD_TAG}/${BINARY_NAME}_darwin_arm64"

Should now be written as:

  - component: $CI_SERVER_FQDN/sylva-projects/sylva-elements/ci-tooling/ci-components/release-notes/release-notes@switch-to-pure-glab
    inputs:
      release_assets_links:
        - name: 'Linux amd64'
          url: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${RELEASE_NAME}/${BUILD_TAG}/${BINARY_NAME}_linux_amd64"
        - name: 'Linux arm64'
          url: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${RELEASE_NAME}/${BUILD_TAG}/${BINARY_NAME}_linux_arm64"
        - name: 'Darwin amd64'
          url: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${RELEASE_NAME}/${BUILD_TAG}/${BINARY_NAME}_darwin_amd64"
        - name: 'Darwin arm64'
          url: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${RELEASE_NAME}/${BUILD_TAG}/${BINARY_NAME}_darwin_arm64"
        
Edited by Jonathan GAYVALLET

Merge request reports

Loading
Loading