# .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 ./buildShaders.sh # Ensure the script is executable - ./buildShaders.sh # Execute the script - chmod +x ./glbuild.sh # Ensure the script is executable - ./glbuild.sh # Execute the script artifacts: paths: - js/framework.js - build_job.env # Ensure the build_job.env file is included in the artifacts reports: dotenv: build_job.env only: - master # Run this job only when changes are pushed to the master branch after_script: # Save the job ID in a .env file to be used by the next job - echo "BUILD_JOB_ID=$CI_JOB_ID" >> build_job.env release_job: stage: release image: registry.gitlab.com/gitlab-org/release-cli:latest dependencies: - build_job 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' url: "https://gitlab.com/${CI_PROJECT_PATH}/-/jobs/$BUILD_JOB_ID/artifacts/raw/js/framework.js" only: - master # Run this job only when changes are pushed to the master branch before_script: - source build_job.env