image: docker:latest stages: - test - storybook # Theme Steps Matrix Theme Test: image: node:14.15.0 stage: test tags: - gatsby-runner-dev-1 script: - npm config set //registry.npmjs.org/:_authToken $NPM_AUTH_TOKEN - yarn config set cache-folder .yarn - yarn - yarn workspace gatsby-sports-theme test artifacts: paths: - coverage/ coverage: /All files\s*\|\s*([\d\.]+)/ rules: - if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "beta"' - if: '($CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH == "beta") && $PIPELINE == "automated"' - if: '$CI_PIPELINE_SOURCE == "push" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "beta") && $PIPELINE == "automated"' Theme Publish: image: node:20.8.1 stage: publish tags: - gatsby-runner-dev-docker before_script: - git config --global http.sslverify false - git config --global user.email "floyd@gig.com" - git config --global user.name "floyd" - echo "@gigmedia:registry=https://npm.gigmedia.tech/" >> ~/.npmrc - echo "//npm.gigmedia.tech/:_authToken=${NPM_PRIVATE_TOKEN}" >> ~/.npmrc script: - export HUSKY=0 - yarn config set cache-folder .yarn - yarn - cd sports-theme/ - yarn - npx semantic-release@22.0.0 -b $CI_COMMIT_REF_NAME when: manual only: refs: - master variables: - $PIPELINE != "content-trigger" Theme Beta Publish: image: node:20.8.1 stage: publish-beta tags: - gatsby-runner-dev-docker before_script: - git config --global http.sslverify false - git config --global user.email "floyd@gig.com" - git config --global user.name "floyd" - echo "@gigmedia:registry=https://npm.gigmedia.tech/" >> ~/.npmrc - echo "//npm.gigmedia.tech/:_authToken=${NPM_PRIVATE_TOKEN}" >> ~/.npmrc script: - export HUSKY=0 - yarn config set cache-folder .yarn - yarn - cd sports-theme/ - npx semantic-release when: manual only: refs: - beta variables: PIPELINE: automated