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