# .gitlab-ci.yml # Define stages for the pipeline stages: - build - release # Define a job that runs when something is pushed to the master branch build_job: stage: build 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 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. assets: links: - name: 'Framework JS file' url: '$CI_SERVER_URL/$CI_PROJECT_PATH/-/jobs/$JOB_ID/artifacts/download' only: - master # Run this job only when changes are pushed to the master branch