NPM publish using Node container (#4)
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:
Julien Valverdé
2023-12-29 04:27:34 +01:00
parent bbc98cdc59
commit 30ca69c33d
4 changed files with 28 additions and 6 deletions

View File

@@ -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,
],
},