NPM publish using Node container (#4)
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Co-authored-by: Julien Valverdé <julien.valverde@mailo.com> Reviewed-on: https://git.jvalver.de/Thilawyn/thilatrait/pulls/4
This commit was merged in pull request #4.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
local bun_image = "oven/bun:1";
|
||||
local node_image = "node:20";
|
||||
|
||||
|
||||
local fetch_step = {
|
||||
@@ -25,14 +26,25 @@ local build_step = {
|
||||
commands: ["bun run build"],
|
||||
};
|
||||
|
||||
local pack_step = {
|
||||
name: "pack",
|
||||
image: node_image,
|
||||
commands: ["npm pack"],
|
||||
};
|
||||
|
||||
local publish_step = {
|
||||
name: "publish",
|
||||
image: "plugins/npm",
|
||||
image: node_image,
|
||||
|
||||
settings: {
|
||||
registry: "https://git.jvalver.de/api/packages/jvalverde/npm",
|
||||
token: { from_secret: "npm_token" },
|
||||
environment: {
|
||||
NPM_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,
|
||||
lint_step,
|
||||
build_step,
|
||||
pack_step,
|
||||
],
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user