From 4f21e40f739055dee4e483455646ea4ae39c3341 Mon Sep 17 00:00:00 2001 From: Arnout Engelen Date: Thu, 9 Jul 2020 16:42:11 +0200 Subject: [PATCH] Publish the target directory without creating our own tarball This way 'npm publish' works and the package correctly has the resources in a '/package' directory inside the tarball. Tested by publishing locally, indeed the README is now correctly shown at https://www.npmjs.com/package/mastodon-bot/v/1.0.1-test-raboof-3 Will release 1.0.2 from master after merging --- .github/workflows/release.yml | 3 +-- RELEASING.md | 22 ++++++++++------------ package.json | 2 +- 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 741f69e..afa0e22 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -99,5 +99,4 @@ jobs: 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/ - tar -cz -C target/npm-build -f target/npm-build.tgz . - npm publish ./target/npm-build.tgz --access public --dry-run + npm publish ./target/npm-build --access public --dry-run diff --git a/RELEASING.md b/RELEASING.md index 62687f2..2b77be3 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -7,13 +7,12 @@ shadow-cljs compile test shadow-cljs release app chmod a+x mastodon-bot.js rm -rf target/npm-build -mkdir -p target/npm-build/mastodon_bot -cp mastodon-bot.js target/npm-build/mastodon_bot/ -cp package.json target/npm-build/mastodon_bot/ -cp README.md target/npm-build/mastodon_bot/ -tar -cz -C target/npm-build -f target/npm-build.tgz . +mkdir target/npm-build +cp mastodon-bot.js target/npm-build +cp package.json target/npm-build +cp README.md target/npm-build -npm publish ./target/npm-build.tgz --access public +npm publish ./target/npm-build --access public ``` ## prod release (should be done from master) @@ -32,13 +31,12 @@ shadow-cljs release app shadow-cljs release app chmod a+x mastodon-bot.js rm -rf target/npm-build -mkdir -p target/npm-build/mastodon_bot -cp mastodon-bot.js target/npm-build/mastodon_bot/ -cp package.json target/npm-build/mastodon_bot/ -cp README.md target/npm-build/mastodon_bot/ -tar -cz -C target/npm-build -f target/npm-build.tgz . +mkdir target/npm-build +cp mastodon-bot.js target/npm-build +cp package.json target/npm-build +cp README.md target/npm-build -npm publish ./target/npm-build.tgz --access public +npm publish ./target/npm-build --access public # Bump version vi shadow-cljs.edn diff --git a/package.json b/package.json index d5509dc..0ecbacc 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "mastodon-bot", "description": "Bot to publish twitter, tumblr or rss posts to an mastodon account.", "author": "Dmitri Sotnikov", - "version": "1.0.1", + "version": "1.0.2", "homepage": "https://github.com/yogthos/mastodon-bot", "repository": "https://github.com/yogthos/mastodon-bot", "license": "MIT",