-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.drone.yml
111 lines (100 loc) · 1.91 KB
/
.drone.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
---
kind: pipeline
type: docker
name: default build for promote
trigger:
event:
- push
branch:
- main
steps:
- name: ready
image: bash
commands:
- echo "ready"
---
kind: pipeline
type: docker
name: cli publish npm
trigger:
event:
- promote
target:
# publish the package @iexec/iapp-maker on npm with the tag latest
- cli-publish-latest
# publish the package @iexec/iapp-maker on npm with the tag nightly
- cli-publish-nightly
branch:
- main
steps:
- name: install-deps
image: node:20
pull: always
commands:
- cd cli
- npm ci
- name: check-format
image: node:20
commands:
- cd cli
- npm run check-format
depends_on:
- install-deps
- name: lint
image: node:20
commands:
- cd cli
- npm run lint
depends_on:
- install-deps
- name: test-no-crash
image: node:20
commands:
- cd cli
- npm i -g .
- cd
- iapp -h
depends_on:
- install-deps
- name: set-version-nightly
image: node:20
commands:
- cd cli
- eval npm pkg set version="$(npm pkg get version)-nightly-$DRONE_COMMIT"
when:
target:
- cli-publish-nightly
depends_on:
- install-deps
- name: npm publish nightly
image: plugins/npm
settings:
username:
from_secret: npm_username
token:
from_secret: npm_token
# TODO: change to nightly
tag: latest
access: public
folder: cli
when:
target:
- cli-publish-nightly
depends_on:
- test-no-crash
- set-version-nightly
- name: npm-publish-latest
image: plugins/npm
settings:
username:
from_secret: npm_username
token:
from_secret: npm_token
tag: latest
access: public
folder: cli
when:
target:
- cli-publish-latest
depends_on:
- test-no-crash