ci: added npm publish step

This commit is contained in:
Giles Bradshaw 2020-07-30 09:02:45 +01:00
parent 5a96d9a970
commit 8eebbc4869
3 changed files with 26 additions and 20 deletions

View File

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

View File

@ -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:

View File

@ -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
```