hopefully fix publishing

This commit is contained in:
jem 2021-02-12 12:28:21 +01:00
parent 85406aab99
commit 091b939887

View file

@ -22,15 +22,12 @@ stages:
paths: paths:
- node_modules/ - node_modules/
before_script: before_script:
- echo _auth=$NPM_PUBLSH_KEY >> .npmrc - echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
- echo email=$NPM_PUBLSH_MAIL >> .npmrc - mkdir -p target/npm-build
- echo always-auth=true >> .npmrc - cp target/mastodon-bot.js target/npm-build/
- mkdir -p target/npm-build/mastodon_bot - cp target/mastodon-bot.js.sha256 target/npm-build/
- cp target/mastodon-bot.js target/npm-build/mastodon_bot/ - cp target/mastodon-bot.js.sha512 target/npm-build/
- cp target/mastodon-bot.js.sha256 target/npm-build/mastodon_bot/ - cp README.md target/npm-build/
- cp target/mastodon-bot.js.sha512 target/npm-build/mastodon_bot/
- cp package.json target/npm-build/mastodon_bot/
- cp README.md target/npm-build/mastodon_bot/
build: build:
<<: *cljs <<: *cljs
@ -68,7 +65,8 @@ upload-prerelease:
- if: '$CI_COMMIT_BRANCH == "master" && $CI_COMMIT_TAG == null' - if: '$CI_COMMIT_BRANCH == "master" && $CI_COMMIT_TAG == null'
script: script:
- npm version --no-git-tag-version prerelease - npm version --no-git-tag-version prerelease
- npm publish ./target/npm-build/mastodon_bot --access public - cp package.json target/npm-build/
- npm publish ./target/npm-build --access public
upload-release: upload-release:
<<: *js-upload <<: *js-upload
@ -77,4 +75,5 @@ upload-release:
- if: '$CI_COMMIT_BRANCH == "master" && $CI_COMMIT_TAG != null' - if: '$CI_COMMIT_BRANCH == "master" && $CI_COMMIT_TAG != null'
script: script:
- npm version --no-git-tag-version $CI_COMMIT_TAG - npm version --no-git-tag-version $CI_COMMIT_TAG
- npm publish ./target/npm-build/mastodon_bot --access public - cp package.json target/npm-build/
- npm publish ./target/npm-build --access public