@dotcom-tool-kit/circleci-npm 1.7.0-beta.2 → 1.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.d.ts CHANGED
@@ -4,6 +4,7 @@ export declare const tasks: (typeof NpmPublish)[];
4
4
  declare class PublishHook extends CircleCiConfigHook {
5
5
  job: string;
6
6
  jobOptions: {
7
+ context: string;
7
8
  requires: string[];
8
9
  filters: {
9
10
  branches: {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,MAAM,+CAA+C,CAAA;AAC9E,OAAO,UAA2B,MAAM,4CAA4C,CAAA;AAEpF,eAAO,MAAM,KAAK,uBAAe,CAAA;AAEjC,cAAM,WAAY,SAAQ,kBAAkB;IAC1C,GAAG,SAAqB;IACxB,UAAU;;;;;;;;;;MAMT;CACF;AAED,eAAO,MAAM,KAAK;;CAEjB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,MAAM,+CAA+C,CAAA;AAC9E,OAAO,UAA2B,MAAM,4CAA4C,CAAA;AAEpF,eAAO,MAAM,KAAK,uBAAe,CAAA;AAEjC,cAAM,WAAY,SAAQ,kBAAkB;IAC1C,GAAG,SAAqB;IACxB,UAAU;;;;;;;;;;;MAOT;CACF;AAED,eAAO,MAAM,KAAK;;CAEjB,CAAA"}
package/lib/index.js CHANGED
@@ -10,6 +10,7 @@ class PublishHook extends circleci_config_1.default {
10
10
  super(...arguments);
11
11
  this.job = 'tool-kit/publish';
12
12
  this.jobOptions = {
13
+ context: 'npm-publish-token',
13
14
  requires: ['tool-kit/test'],
14
15
  filters: {
15
16
  branches: { ignore: '/.*/' },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dotcom-tool-kit/circleci-npm",
3
- "version": "1.7.0-beta.2",
3
+ "version": "1.8.1",
4
4
  "description": "",
5
5
  "main": "lib",
6
6
  "scripts": {
@@ -10,9 +10,9 @@
10
10
  "author": "FT.com Platforms Team <platforms-team.customer-products@ft.com>",
11
11
  "license": "ISC",
12
12
  "dependencies": {
13
- "@dotcom-tool-kit/types": "^1.7.0-beta.2",
14
- "@dotcom-tool-kit/circleci": "^1.7.0-beta.2",
15
- "@dotcom-tool-kit/npm": "^1.7.0-beta.2"
13
+ "@dotcom-tool-kit/types": "^1.8.1",
14
+ "@dotcom-tool-kit/circleci": "^1.8.1",
15
+ "@dotcom-tool-kit/npm": "^1.8.1"
16
16
  },
17
17
  "repository": {
18
18
  "type": "git",
package/readme.md CHANGED
@@ -23,7 +23,23 @@ And install this plugin's hooks:
23
23
  npx dotcom-tool-kit --install
24
24
  ```
25
25
 
26
- This will add the tool-kit/publish job to your `config.yml`.
26
+ If you have the automated comment `# CONFIG GENERATED BY DOTCOM-TOOL-KIT, DO NOT EDIT BY HAND\n` in your `config.yml`, this will add the tool-kit/publish job to your `config.yml`. Furthermore, this will add the tags filter to the rest of the tool-kit jobs in your workflow in `config.yml`, as CircleCI will only run the jobs if the rest of the jobs have the tags filter.
27
+
28
+ If you don't have the automated comment in your `config.yml` and therefore choose to add the tool-kit/publish job manually, (1) copy and paste the below code snippet and (2) add the tags filter to the rest of the tool-kit jobs (you may refer to dotcom-tool-kit/core/sandbox/.circleci/config.yml as an example for this)
29
+
30
+ ```yaml
31
+ - tool-kit/publish:
32
+ context: npm-publish-token
33
+ requires:
34
+ - tool-kit/test
35
+ filters:
36
+ branches:
37
+ ignore: /.*/
38
+ tags:
39
+ only: /^v\d+\.\d+\.\d+(-.+)?/
40
+ ```
41
+
42
+ The tool-kit/publish job is triggered in your circleci pipeline once you do a release with a tag matching the semver format, e.g. `v1.6.0-beta.1`, `v1.6.0`. If your tag is a beta version, i.e. `v1.6.0-beta.1`, then the publish job will tag your build as a prerelease version. But if your tag is a release version, i.e. `v1.6.0`, then the publish job will tag your build as the latest version.
27
43
 
28
44
  ## Hooks
29
45