github.com/codefresh-io/kcfi@v0.0.0-20230301195427-c1578715cc46/codefresh.yml (about)

     1  version: '1.0'
     2  stages:
     3    - clone
     4    - prepare
     5    - release
     6  steps:
     7    main_clone:
     8      title: 'Cloning main repository...'
     9      stage: clone
    10      type: git-clone
    11      repo: "${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}"
    12      revision: "${{CF_REVISION}}"
    13      git: "${{GIT_CONTEXT}}"
    14  
    15    validate_version:
    16      image: codefreshio/ci-helpers
    17      stage: prepare
    18      commands:
    19        - hack/version_check.sh
    20        
    21    prepare_env_vars:
    22      title: 'Preparing environment variables...'
    23      stage: prepare
    24      image: codefreshio/ci-helpers
    25      commands:
    26        - source /get-token/get-gh-token.sh
    27        - cf_export GITHUB_TOKEN
    28        - cf_export INSTALLER_VERSION=$(cat version)
    29  
    30    submodules_init:
    31      title: "Initializing cf-helm submodule"
    32      stage: prepare
    33      image: codefreshio/ci-helpers
    34      commands:
    35        - mkdir -p ~/.ssh
    36        - echo $SSH_KEY | base64 -d > ~/.ssh/id_rsa && ssh-keyscan -H github.com >> ~/.ssh/known_hosts
    37        - chmod 600 ~/.ssh/id_rsa
    38        - git submodule update --init
    39        
    40    create_git_tag:
    41      image: codefreshio/ci-helpers
    42      stage: release
    43      commands:
    44        - git tag ${INSTALLER_VERSION}
    45      when:
    46        branch:
    47          only: [master]
    48            
    49    release_binaries:
    50      title: Create release in Github with the installer CLI
    51      image: codefresh/goreleaser:${{GOLANG_VERSION}}
    52      stage: release
    53      commands:
    54        - hack/build.sh
    55        - cd cmd/kcfi
    56        - goreleaser release -f ../../.goreleaser.yml --rm-dist --skip-validate
    57      when:
    58        branch:
    59          only: [master]