diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 591f2d7..ab102f3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,7 +22,7 @@ publish: - npx semantic-release # Build the files. - - npm run build + - npm run upload artifacts: expire_in: 1 week diff --git a/package.json b/package.json index 2fe131b..b77a019 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,12 @@ "build:docx": "sed 's@­@@g' < dmoonfire-$npm_package_fedran_pov-$npm_package_fedran_vol-$npm_package_name-$npm_package_version.html | pandoc -f html -t docx -o dmoonfire-$npm_package_fedran_pov-$npm_package_fedran_vol-$npm_package_name-$npm_package_version.docx", "build:mobi": "kindlegen dmoonfire-$npm_package_fedran_pov-$npm_package_fedran_vol-$npm_package_name-$npm_package_version.epub", "build:html": "mfgames-writing-format build html", - "commitmsg": "commitlint -E GIT_PARAMS" + "prebuild:mobi": "npm run build:epub", + "prebuild": "rm -f $npm_package_name-*.* $npm_package_name.tar.bz2", + "bundle": "tar -cjf $npm_package_name.tar.bz2 *.epub *.pdf", + "prebundle": "npm run build", + "upload": "aws --endpoint-url https://$AWS_ENDPOINT s3 cp --acl public-read $npm_package_name.tar.bz2 s3://$AWS_BUCKET/$npm_package_name.tar.bz2", + "preupload": "npm run bundle" }, "dependencies": { "@fedran/writing-hyphen": "^1.0.0", @@ -71,5 +76,10 @@ "path": "./node_modules/cz-conventional-changelog" } }, + "husky": { + "hooks": { + "commit-msg": "commitlint -E HUSKY_GIT_PARAMS" + } + }, "private": true }