# .gitlab-ci.yml # Define stages for the pipeline stages: - deploy # Define a job that runs when something is pushed to the master branch deploy_job: stage: deploy script: - apt-get update -qy - chmod +x ./glbuild.sh # Ensure the script is executable - ./glbuild.sh # Execute the script artifacts: paths: - js/framework.js only: - master # Run this job only when changes are pushed to the master branch release_job: stage: release image: registry.gitlab.com/gitlab-org/release-cli:latest rules: - if: $CI_COMMIT_TAG when: never # Do not run this job when a tag is created manually - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Run this job when commits are pushed or merged to the default branch script: - echo "running release_job for $TAG" release: name: 'v0.$CI_PIPELINE_IID' tag_name: 'v0.$CI_PIPELINE_IID' # The version is incremented per pipeline. description: 'v0.$CI_PIPELINE_IID' ref: '$CI_COMMIT_SHA' # The tag is created from the pipeline SHA. only: - master # Run this job only when changes are pushed to the master branch