diff --git a/.drone.yml b/.drone.yml index 3a39d8c..bd92dc4 100644 --- a/.drone.yml +++ b/.drone.yml @@ -15,49 +15,26 @@ steps: image: node:12 commands: - npm run build:prod - - name: pre-release - image: plugins/gitea-release - settings: - api_key: - from_secret: gitea_token - base_url: https://gittr.ch/ - checksum: - - md5 - - sha512 - draft: true - files: dist/* - note: README.md - title: VERSION + - name: update version + image: node:12 + commands: + - npm version prerelease when: - branch: develop - - name: test-release - image: plugins/gitea-release - settings: - api_key: - from_secret: gitea_token - base_url: https://gittr.ch/ - checksum: - - md5 - - sha512 - draft: true - files: dist/* - note: README.md - prerelease: true - title: VERSION - when: - branch: feature/* - - name: release - image: plugins/gitea-release - settings: - api_key: - from_secret: gitea_token - base_url: https://gittr.ch/ - checksum: - - md5 - - sha512 - files: dist/* - file_exists: fail - note: README.md - title: VERSION - when: - event: tag + branch: + - develop + - feature/* +# - name: release +# image: plugins/gitea-release +# settings: +# api_key: +# from_secret: gitea_token +# base_url: https://gittr.ch/ +# checksum: +# - md5 +# - sha512 +# files: dist/* +# file_exists: fail +# note: README.md +# title: VERSION +# when: +# event: tag diff --git a/package.json b/package.json index 707109c..ae2537f 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,10 @@ "start": "webpack-dev-server --open --config webpack.dev.js", "lint": "eslint --ext .ts src/", "build": "webpack --mode development --env development --config webpack.dev.js", - "build:prod": "webpack -p --mode production --env production --config webpack.prod.js" + "build:prod": "webpack -p --mode production --env production --config webpack.prod.js", + "preversion": "echo npm test", + "version": "npm run build:prod && echo $npm_package_version > VERSION && git add -A .", + "postversion": "git push && git push --tags" }, "dependencies": { "jquery": "3.4.1",