|
1 | | -# kind: pipeline |
2 | | -# name: release |
3 | | -# |
4 | | -# steps: |
5 | | -# - name: autotag |
6 | | -# image: node |
7 | | -# environment: |
8 | | -# GIT_USER: |
9 | | -# from_secret: GITHUB_USERNAME |
10 | | -# GIT_SECRET: |
11 | | -# from_secret: GITHUB_KEY |
12 | | -# commands: |
13 | | -# - npm install -g @author.io/cicd-autotag |
14 | | -# - autotag --allowInitialNpmPublish |
15 | | -# when: |
16 | | -# event: |
17 | | -# - push |
18 | | -# - name: tag_notification |
19 | | -# image: plugins/slack |
20 | | -# settings: |
21 | | -# webhook: |
22 | | -# from_secret: SLACK_WEBHOOK |
23 | | -# channel: releases |
24 | | -# icon_url: https://avatars0.githubusercontent.com/u/46585558?s=32 |
25 | | -# template: > |
26 | | -# <author-{{repo.name}}> autotag on {{build.event}} to {{repo.owner}}/{{repo.name}} failed ({{build.tag}}). See {{build.link}} for details. |
27 | | -# icon_emoji: warning |
28 | | -# when: |
29 | | -# status: [ failure ] |
30 | | -# event: |
31 | | -# - push |
32 | | -# - name: build |
33 | | -# image: node |
34 | | -# commands: |
35 | | -# - npm install |
36 | | -# - npm run build |
37 | | -# when: |
38 | | -# event: |
39 | | -# - tag |
40 | | -# - name: github_release |
41 | | -# image: plugins/github-release |
42 | | -# settings: |
43 | | -# api_key: |
44 | | -# from_secret: GITHUB_TOKEN |
45 | | -# files: dist/**/* |
46 | | -# when: |
47 | | -# event: |
48 | | -# - tag |
49 | | -# - name: npm_release |
50 | | -# image: plugins/npm |
51 | | -# settings: |
52 | | -# username: |
53 | | -# from_secret: NPM_USERNAME |
54 | | -# password: |
55 | | -# from_secret: NPM_PASSWORD |
56 | | -# email: |
57 | | -# from_secret: NPM_EMAIL |
58 | | -# registry: "https://registry.npmjs.org" |
59 | | -# when: |
60 | | -# event: |
61 | | -# - tag |
62 | | -# - name: release_notification |
63 | | -# image: plugins/slack |
64 | | -# settings: |
65 | | -# webhook: |
66 | | -# from_secret: SLACK_WEBHOOK |
67 | | -# channel: releases |
68 | | -# icon_url: https://avatars0.githubusercontent.com/u/46585558?s=32 |
69 | | -# template: > |
70 | | -# <author-{{repo.name}}> {{build.tag}} (build {{build.number}}) {{#success build.status}}released{{else}}failed{{/success}}. |
71 | | -# {{build.link}} |
72 | | -# |
73 | | -# {{#success build.status}} |
74 | | -# Availability: |
75 | | -# - CDN: https://cdn.author.io/{{repo.owner}}/{{repo.name}}/{{build.tag}}/author-{{repo.name}}.js |
76 | | -# - npm: `npm install @author.io/element-{{repo.name}}@{{build.tag}}` |
77 | | -# - Release: https://github.com/{{repo.owner}}/{{repo.name}}/releases/tag/{{build.tag}} |
78 | | -# {{/success}} |
79 | | -# when: |
80 | | -# event: |
81 | | -# - tag |
| 1 | +kind: pipeline |
| 2 | +name: release |
| 3 | + |
| 4 | +steps: |
| 5 | + - name: autotag |
| 6 | + image: node |
| 7 | + environment: |
| 8 | + GIT_USER: |
| 9 | + from_secret: GITHUB_USERNAME |
| 10 | + GIT_SECRET: |
| 11 | + from_secret: GITHUB_KEY |
| 12 | + commands: |
| 13 | + - npm install -g @author.io/cicd-autotag |
| 14 | + - autotag --allowInitialNpmPublish |
| 15 | + when: |
| 16 | + event: |
| 17 | + - push |
| 18 | + - name: tag_notification |
| 19 | + image: plugins/slack |
| 20 | + settings: |
| 21 | + webhook: |
| 22 | + from_secret: SLACK_WEBHOOK |
| 23 | + channel: releases |
| 24 | + icon_url: https://avatars0.githubusercontent.com/u/46585558?s=32 |
| 25 | + template: > |
| 26 | + <author-{{repo.name}}> autotag on {{build.event}} to {{repo.owner}}/{{repo.name}} failed ({{build.tag}}). See {{build.link}} for details. |
| 27 | + icon_emoji: warning |
| 28 | + when: |
| 29 | + status: [ failure ] |
| 30 | + event: |
| 31 | + - push |
| 32 | + - name: build |
| 33 | + image: node |
| 34 | + commands: |
| 35 | + - npm install |
| 36 | + - npm run build |
| 37 | + when: |
| 38 | + event: |
| 39 | + - tag |
| 40 | + - name: github_release |
| 41 | + image: plugins/github-release |
| 42 | + settings: |
| 43 | + api_key: |
| 44 | + from_secret: GITHUB_TOKEN |
| 45 | + files: dist/**/* |
| 46 | + when: |
| 47 | + event: |
| 48 | + - tag |
| 49 | + - name: npm_release |
| 50 | + image: plugins/npm |
| 51 | + settings: |
| 52 | + username: |
| 53 | + from_secret: NPM_USERNAME |
| 54 | + password: |
| 55 | + from_secret: NPM_PASSWORD |
| 56 | + email: |
| 57 | + from_secret: NPM_EMAIL |
| 58 | + registry: "https://registry.npmjs.org" |
| 59 | + when: |
| 60 | + event: |
| 61 | + - tag |
| 62 | + - name: release_notification |
| 63 | + image: plugins/slack |
| 64 | + settings: |
| 65 | + webhook: |
| 66 | + from_secret: SLACK_WEBHOOK |
| 67 | + channel: releases |
| 68 | + icon_url: https://avatars0.githubusercontent.com/u/46585558?s=32 |
| 69 | + template: > |
| 70 | + <author-{{repo.name}}> {{build.tag}} (build {{build.number}}) {{#success build.status}}released{{else}}failed{{/success}}. |
| 71 | + {{build.link}} |
| 72 | +
|
| 73 | + {{#success build.status}} |
| 74 | + Availability: |
| 75 | + - CDN: https://cdn.author.io/{{repo.owner}}/{{repo.name}}/{{build.tag}}/author-{{repo.name}}.js |
| 76 | + - npm: `npm install @author.io/element-{{repo.name}}@{{build.tag}}` |
| 77 | + - Release: https://github.com/{{repo.owner}}/{{repo.name}}/releases/tag/{{build.tag}} |
| 78 | + {{/success}} |
| 79 | + when: |
| 80 | + event: |
| 81 | + - tag |
0 commit comments