ci: added npm publish step
This commit is contained in:
parent
5a96d9a970
commit
8eebbc4869
|
@ -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}',
|
||||
],
|
||||
},
|
||||
|
||||
],
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue