diff --git a/.drone/.drone.jsonnet b/.drone/.drone.jsonnet index 4b27bf0..fd2edac 100644 --- a/.drone/.drone.jsonnet +++ b/.drone/.drone.jsonnet @@ -13,16 +13,21 @@ }, steps: [ { - name: 'step', - image: 'alpine', - when: { - event: ['tag'], + name: 'publish', + image: 'plugins/npm', + settings: { + settings: { + username: { + from_secret: 'npm-user', + }, + password: { + from_secret: 'npm-password', + }, + email: { + from_secret: 'npm-email', + }, + }, }, - commands: [ - 'echo hello', - 'echo $${DRONE_COMMIT}', - 'echo $${DRONE_TAG}', - ], }, ], diff --git a/.drone/.drone.yml b/.drone/.drone.yml index b485289..c86d4a2 100644 --- a/.drone/.drone.yml +++ b/.drone/.drone.yml @@ -8,15 +8,16 @@ platform: arch: amd64 steps: -- name: step - image: alpine - commands: - - echo hello - - echo $${DRONE_COMMIT} - - echo $${DRONE_TAG} - when: - event: - - tag +- name: publish + image: plugins/npm + settings: + settings: + email: + from_secret: npm-email + password: + from_secret: npm-password + username: + from_secret: npm-user trigger: event: diff --git a/.drone/README.md b/.drone/README.md index 237b41b..04f6142 100644 --- a/.drone/README.md +++ b/.drone/README.md @@ -12,8 +12,8 @@ make a pre commit hook to compile ```shell -echo `drone jsonnet --source .drone/.drone.jsonnet --target .drone/.drone.yml --stream` > .git/hooks/pre-commit -echo `git add .drone/.drone.yml` > .git/hooks/pre-commit +echo 'drone jsonnet --source .drone/.drone.jsonnet --target .drone/.drone.yml --stream' > .git/hooks/pre-commit +echo 'git add .drone/.drone.yml' >> .git/hooks/pre-commit chmod +x .git/hooks/pre-commit ```