Commit 8984c89b authored by Antony Le Courtes's avatar Antony Le Courtes
Browse files

Update .gitlab-ci.yml file

parent ee234994
Loading
Loading
Loading
Loading
Loading
+23 −0
Changes for .gitlab-ci.yml: 23 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -41,4 +41,27 @@ build_js:
    paths:
      - js/dist

# Publier sur le packagist
publish_php:
  stage: publish
  image: python:3.9
  rules:
      - if: '$CI_COMMIT_TAG'
  script:
    - apt-get update && apt-get -y upgrade && apt-get -y install curl
    - curl https://gest.unicaen.fr/packagist/update

# Publier sur GitLab Registry
publish_js:
  stage: publish
  rules:
    - if: '$CI_COMMIT_TAG'
  script:
    - cd $JS_DIR
    - npm ci
    - echo "@unicaen:registry=https://git.unicaen.fr/api/v4/projects/packages/npm/" > .npmrc
    - echo "//git.unicaen.fr/api/v4/projects/3513/packages/npm/:_authToken=$NPM_DEPLOY_TOKEN" >> .npmrc
    - npm publish --access public


# Optionnel : publier sur GitLab Registry, npm ou packagist