This repository has been archived on 2023-05-27. You can view files and clone it, but cannot push or open issues or pull requests.
js-feditoken/.drone.jsonnet
Sam Therapy 40a4fb0225
All checks were successful
continuous-integration/drone/push Build is passing
fix(ci): Fix publish pipeline
Signed-off-by: Sam Therapy <sam@samtherapy.net>
2022-12-28 16:18:06 +01:00

91 lines
1.4 KiB
Text

local pipe(arch) = {
kind: 'pipeline',
type: 'docker',
name: arch,
platform: {
arch: arch,
},
steps: [
{
name: 'deps',
image: 'node',
commands: [
'curl -L https://pnpm.js.org/pnpm.js | node - add --global pnpm@7',
'pnpm i',
],
},
{
name: 'lint',
image: 'node',
commands: [
'npm run lint:ci',
],
depends_on: [
'deps',
],
},
{
name: 'build',
image: 'node',
commands: [
'npm run build',
],
depends_on: [
'lint',
],
},
],
trigger: {
event: {
exclude: [
'tag',
],
},
},
};
local release(arch) = {
kind: 'pipeline',
type: 'docker',
name: 'release-%s' % [arch],
platform: {
arch: arch,
},
trigger: {
event: [
'tag',
],
},
steps: [
{
name: 'build',
image: 'node:lts',
commands: [
'curl -L https://pnpm.js.org/pnpm.js | node - add --global pnpm@7',
'pnpm i',
'pnpm build',
],
},
{
name: 'publish',
image: 'plugins/npm',
settings: {
token: {
from_secret: 'release_api_key',
},
registry: 'https://git.froth.zone/api/packages/sam/npm/',
},
depends_on: [
'build',
],
},
],
};
[
pipe('amd64'),
pipe('arm64'),
release('amd64'),
// release('arm64'),
]