From 72afd803735cc61075629d4da08ce2b2ac2581fb Mon Sep 17 00:00:00 2001 From: jem Date: Fri, 12 Feb 2021 13:26:24 +0100 Subject: [PATCH] choose better names --- .gitlab-ci.yml | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 082033b..7ce896c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,5 @@ stages: - - test + - build_and_test - package - security - upload @@ -29,23 +29,35 @@ stages: - cp target/mastodon-bot.js.sha512 target/npm-build/ - cp README.md target/npm-build/ -build: +build_and_test: <<: *cljs - stage: test + stage: build_and_test script: - shadow-cljs compile test -package: +#activate as soon as https://github.com/thheller/shadow-cljs/issues/843 is implemented +.report: <<: *cljs - stage: package + stage: build_and_test + script: + - shadow-cljs run shadow.cljs.build-report app target/build-report.html artifacts: paths: - - target/ + - target/build-report.html + +package: + <<: *cljs + stage: package script: - shadow-cljs compile app - chmod a+x target/mastodon-bot.js - sha256sum target/mastodon-bot.js > target/mastodon-bot.js.sha256 - sha512sum target/mastodon-bot.js > target/mastodon-bot.js.sha512 + artifacts: + paths: + - target/mastodon-bot.js + - target/mastodon-bot.js.sha256 + - target/mastodon-bot.js.sha512 sast: variables: @@ -64,9 +76,11 @@ upload-prerelease: rules: - if: '$CI_COMMIT_BRANCH == "master" && $CI_COMMIT_TAG == null' script: - - npm version --no-git-tag-version prerelease - cp package.json target/npm-build/ - npm publish ./target/npm-build --access public + # unsure wether that's a good idea to bump versions from ci. + #- npm version prerelease -m "[skip-ci] version bump prerelease version" + #- git push upload-release: <<: *js-upload @@ -74,6 +88,5 @@ upload-release: rules: - if: '$CI_COMMIT_BRANCH == "master" && $CI_COMMIT_TAG != null' script: - - npm version --no-git-tag-version $CI_COMMIT_TAG - cp package.json target/npm-build/ - npm publish ./target/npm-build --access public