NPM publish using Node container #4
@@ -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,9 +26,15 @@ local build_step = {
|
|||||||
commands: ["bun run build"],
|
commands: ["bun run build"],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
local pack_step = {
|
||||||
|
name: "publish",
|
||||||
|
image: node_image,
|
||||||
|
commands: ["npm pack"],
|
||||||
|
};
|
||||||
|
|
||||||
local publish_step = {
|
local publish_step = {
|
||||||
name: "publish",
|
name: "publish",
|
||||||
image: "node:20",
|
image: node_image,
|
||||||
|
|
||||||
environment: {
|
environment: {
|
||||||
NPM_TOKEN: { from_secret: "npm_token" }
|
NPM_TOKEN: { from_secret: "npm_token" }
|
||||||
@@ -36,8 +43,7 @@ local publish_step = {
|
|||||||
commands: [
|
commands: [
|
||||||
"npm set registry https://git.jvalver.de/api/packages/thilawyn/npm/",
|
"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 config set -- //git.jvalver.de/api/packages/thilawyn/npm/:_authToken $NPM_TOKEN",
|
||||||
// "npm publish",
|
"npm publish",
|
||||||
"npm pack",
|
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -81,7 +87,7 @@ local publish_step = {
|
|||||||
install_step,
|
install_step,
|
||||||
lint_step,
|
lint_step,
|
||||||
build_step,
|
build_step,
|
||||||
publish_step,
|
pack_step,
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user