NPM publish using Node container #4

Merged
Thilawyn merged 19 commits from npm-publish-fix into master 2023-12-29 04:27:34 +01:00
4 changed files with 28 additions and 6 deletions

View File

@@ -1,4 +1,5 @@
local bun_image = "oven/bun:1"; local bun_image = "oven/bun:1";
local node_image = "node:20";
local fetch_step = { local fetch_step = {
@@ -25,14 +26,25 @@ local build_step = {
commands: ["bun run build"], commands: ["bun run build"],
}; };
local pack_step = {
name: "pack",
image: node_image,
commands: ["npm pack"],
};
local publish_step = { local publish_step = {
name: "publish", name: "publish",
image: "plugins/npm", image: node_image,
settings: { environment: {
registry: "https://git.jvalver.de/api/packages/jvalverde/npm", NPM_TOKEN: { from_secret: "npm_token" }
token: { from_secret: "npm_token" },
}, },
commands: [
"npm set registry https://git.jvalver.de/api/packages/thilawyn/npm/",
"npm config set -- //git.jvalver.de/api/packages/thilawyn/npm/:_authToken $NPM_TOKEN",
"npm publish",
],
}; };
@@ -75,6 +87,7 @@ local publish_step = {
install_step, install_step,
lint_step, lint_step,
build_step, build_step,
pack_step,
], ],
}, },

1
.gitignore vendored
View File

@@ -129,4 +129,3 @@ dist
.yarn/build-state.yml .yarn/build-state.yml
.yarn/install-state.gz .yarn/install-state.gz
.pnp.* .pnp.*

10
.npmignore Normal file
View File

@@ -0,0 +1,10 @@
/node_modules/
/src/
/.drone.jsonnet
/.gitignore
/.npmignore
/bun.lockb
/README.md
/rollup.config.js
/tsconfig.json
/tsconfig.tsbuildinfo

View File

@@ -3,7 +3,7 @@
"version": "20231229.0.0", "version": "20231229.0.0",
"type": "module", "type": "module",
"publishConfig": { "publishConfig": {
"registry": "https://git.jvalver.de/api/packages/jvalverde/npm" "registry": "https://git.jvalver.de/api/packages/thilawyn/npm/"
}, },
"exports": { "exports": {
".": { ".": {