diff --git a/package.json b/package.json index 5dbdf9901..a7061a9c9 100644 --- a/package.json +++ b/package.json @@ -32,16 +32,18 @@ "changelog-current": "conventional-changelog -p angular -r 2", "preversion.linux": "npm run test.all && rimraf ./dist && npm run build.prod", "version.linux": "npm run changelog && git add -A CHANGELOG.md", - "postversion.linux": "git push && git push --tags && rimraf igo2.zip && cd ./dist/igo2/ && zip -r ../igo2.zip ./* && npm run ghpages", + "postversion.linux": "git push && git push --tags && rimraf igo2.zip && cd ./dist/igo2/ && zip -r ../igo2.zip ./* && npm run ghpages && ghrelease", "preversion": "npm run test.all && rimraf ./dist && npm run build.prod", "version": "npm run changelog && git add -A CHANGELOG.md", - "postversion": "git push && git push --tags && rimraf igo2.zip && cd ./dist/igo2/ && tar -a -c -f ../igo2.zip * && npm run ghpages.win", + "postversion": "git push && git push --tags && rimraf igo2.zip && cd ./dist/igo2/ && tar -a -c -f ../igo2.zip * && npm run ghpages.win && ghrelease.win", "preghpages": "npm run build -- --configuration=github --output-path ./dist/ghpages --base-href /igo2/ && echo \"include: ['_default.json', '_contexts.json', '_base.json']\" > dist/ghpages/_config.yml", "ghpages": "VERSION=$(node -p -e \"require('./package.json').version\") && npx ngh --dir=dist/ghpages --no-silent=false --message=$VERSION", "postghpages": "rimraf ./dist/ghpages", "preghpages.win": "npm run build -- --configuration=github --output-path ./dist/ghpages --base-href /igo2/ && echo include: ['_default.json', '_contexts.json', '_base.json'] > dist/ghpages/_config.yml", "ghpages.win": "npx ngh --dir=dist/ghpages --no-silent=false --message=%npm_package_version%", - "postghpages.win": "rimraf ./dist/ghpages" + "ghrelease": "VERSION=$(node -p -e \"require('./package.json').version\") && publish-release --owner infra-geo-ouverte --repo igo2 --tag $VERSION --name $VERSION --reuse-release --notes \"$(npm run changelog-current -s)\" --assets dist/igo2.zip", + "preghrelease.win": "rimraf igo2.zip && cd ./dist/igo2/ && tar -a -c -f ../igo2.zip *", + "ghrelease.win": "gh-release -o infra-geo-ouverte -r igo -t %npm_package_version% -n %npm_package_version% -a dist/igo2.zip" }, "private": true, "dependencies": { @@ -122,6 +124,7 @@ "conventional-changelog-cli": "^2.0.12", "eslint": "^7.26.0", "eslint-plugin-unused-imports": "^1.1.5", + "gh-release": "^6.0.1", "gulp": "^4.0.0", "gulp-babel": "^8.0.0", "jasmine-core": "~3.8.0",