diff options
author | Marius David Wieschollek <passwords.public@mdns.eu> | 2020-01-12 02:20:09 +0300 |
---|---|---|
committer | Marius David Wieschollek <passwords.public@mdns.eu> | 2020-01-12 02:20:09 +0300 |
commit | 4a921d0e66941f10f0ca018beb3cfe37d682c1d3 (patch) | |
tree | 3abea878e41493054db049f0c20860ecc015f4ad /.gitlab-ci.yml | |
parent | df032eb28aac5434a6edfc5797389ce6905ef92c (diff) |
Updated deployment for firefox
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 39 |
1 files changed, 34 insertions, 5 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ec7415d..397e69c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,8 +8,6 @@ Compile Firefox: - mkdir dist - npm install - npm run build:firefox - - sed -i -e "s/BUILD/${CI_PIPELINE_ID}/g" ./build/manifest.json - - if [ "${CI_COMMIT_REF_NAME}" != "stable" ] ; then sed -i -e "s/ncpasswords@mdns.eu/ncpasswordsdev@mdns.eu/g" ./build/manifest.json ; fi - mv build dist/firefox-extension artifacts: paths: @@ -21,26 +19,57 @@ Compile Chrome: - mkdir dist - npm install - npm run build:chrome - - sed -i -e "s/99999/${CI_PIPELINE_ID}/g" ./build/manifest.json - mv build dist/chrome-extension artifacts: paths: - ./dist/chrome-extension +Publish Nightly Firefox: + stage: publishing + script: + - 'export ARTIFACT_URL=${CI_PROJECT_URL}/-/jobs/artifacts/${CI_COMMIT_BRANCH}/raw/dist/firefox-extension/FILE?job=Compile+Firefox' + - 'sed -i -e "s|\"gecko\": {|\"gecko\":{\"update_url\":\"ARTIFACT_URL\",|g" ./dist/firefox-extension/manifest.json' + - 'sed -i -e "s|BUILD|${CI_PIPELINE_ID}|g" ./dist/firefox-extension/manifest.json' + - 'sed -i -e "s|ARTIFACT_URL|${ARTIFACT_URL}|g" ./dist/firefox-extension/manifest.json' + - 'sed -i -e "s|FILE|updates.json|g" ./dist/firefox-extension/manifest.json' + - 'sed -i -e "s|BUILD|${CI_PIPELINE_ID}|g" ./dist/firefox-extension/updates.json' + - 'sed -i -e "s|ARTIFACT_URL|${ARTIFACT_URL}|g" ./dist/firefox-extension/updates.json' + - 'sed -i -e "s|FILE|extension.xpi|g" ./dist/firefox-extension/updates.json' + - 'npx web-ext sign --channel unlisted' + environment: + name: Testing + only: + - testing + +Publish Nightly Chrome: + stage: publishing + script: + - 'export WEXT_SHIPIT_CHROME_EXTENSION_ID=${CHROME_EXTENSION_ID_TESTING}' + - 'sed -i -e "s|99999|${CI_PIPELINE_ID}|g" ./dist/chrome-extension/manifest.json' + - 'npx @wext/shipit chrome dist/chrome-extension' + environment: + name: Testing + only: + - testing + Publish Stable Firefox: stage: publishing script: + - 'rm dist/firefox-extension/updates.json' + - 'sed -i -e "s|BUILD||g" ./dist/firefox-extension/manifest.json' - 'npx @wext/shipit firefox dist/firefox-extension' environment: name: Stable only: - - tags + - stable Publish Stable Chrome: stage: publishing script: + - 'export WEXT_SHIPIT_CHROME_EXTENSION_ID=${CHROME_EXTENSION_ID_STABLE}' + - 'sed -i -e "s|99999||g" ./dist/chrome-extension/manifest.json' - 'npx @wext/shipit chrome dist/chrome-extension' environment: name: Stable only: - - tags
\ No newline at end of file + - stable
\ No newline at end of file |