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: [ steps: [
{ {
name: 'step', name: 'publish',
image: 'alpine', image: 'plugins/npm',
when: { settings: {
event: ['tag'], 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 arch: amd64
steps: steps:
- name: step - name: publish
image: alpine image: plugins/npm
commands: settings:
- echo hello settings:
- echo $${DRONE_COMMIT} email:
- echo $${DRONE_TAG} from_secret: npm-email
when: password:
event: from_secret: npm-password
- tag username:
from_secret: npm-user
trigger: trigger:
event: event:

View File

@ -12,8 +12,8 @@ make a pre commit hook to compile
```shell ```shell
echo `drone jsonnet --source .drone/.drone.jsonnet --target .drone/.drone.yml --stream` > .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 echo 'git add .drone/.drone.yml' >> .git/hooks/pre-commit
chmod +x .git/hooks/pre-commit chmod +x .git/hooks/pre-commit
``` ```