semantic-release-vsce 5.0.7 → 5.0.10

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.
@@ -21,7 +21,7 @@ jobs:
21
21
  - 16
22
22
 
23
23
  steps:
24
- - uses: actions/checkout@v2
24
+ - uses: actions/checkout@v3
25
25
  - uses: volta-cli/action@v1
26
26
  with:
27
27
  node-version: ${{ matrix.node-version }}
@@ -34,7 +34,7 @@ jobs:
34
34
  needs: test
35
35
 
36
36
  steps:
37
- - uses: actions/checkout@v2
37
+ - uses: actions/checkout@v3
38
38
  - uses: volta-cli/action@v1
39
39
  - run: npm ci
40
40
  - run: npm run release
package/README.md CHANGED
@@ -9,43 +9,62 @@
9
9
  [![peerDependencies](https://david-dm.org/felipecrs/semantic-release-vsce/peer-status.svg)](https://david-dm.org/felipecrs/semantic-release-vsce?type=peer)
10
10
  [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
11
11
 
12
- #### Add config to package.json
12
+ | Step | Description |
13
+ |--------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
14
+ | `verify` | Verify the presence and the validity of the authentication (set via [environment variables](#environment-variables)) and the `package.json`|
15
+ | `prepare` | Generate the `.vsix` file using vsce, this can be be controlled by providing `packageVsix` in config. <br/> *Note:- If the `OVSX_PAT` env variable is set, this step will still run*|
16
+ | `publish` | Publish the extension|
13
17
 
14
- Use `semantic-release-vsce` as part of `verifyConditions` and `publish`.
18
+ ## Install
19
+
20
+ ```bash
21
+ npm install --save-dev semantic-release-vsce
22
+ ```
23
+
24
+ OR
25
+
26
+ ```bash
27
+ yarn add -D semantic-release-vsce
28
+ ```
29
+
30
+ ## Usage
31
+
32
+ The plugin can be configured in the [**semantic-release** configuration file](https://github.com/semantic-release/semantic-release/blob/master/docs/usage/configuration.md#configuration):
15
33
 
16
34
  ```json
17
35
  {
18
- "scripts": {
19
- "semantic-release": "semantic-release"
20
- },
21
- "release": {
22
- "verifyConditions": [
23
- "semantic-release-vsce",
24
- "@semantic-release/github"
25
- ],
26
- "prepare": {
27
- "path": "semantic-release-vsce",
28
- "packageVsix": true
29
- },
30
- "publish": [
31
- "semantic-release-vsce",
32
- {
33
- "path": "@semantic-release/github",
34
- "assets": "*.vsix"
35
- }
36
- ]
37
- },
38
- "devDependencies": {
39
- "semantic-release": "^17.0.0",
40
- "semantic-release-vsce": "^2.1.0",
41
- }
36
+ "plugins": [
37
+ "@semantic-release/commit-analyzer",
38
+ "@semantic-release/release-notes-generator",
39
+ ["semantic-release-vsce", {
40
+ "packageVsix": true
41
+ }],
42
+ ["@semantic-release/github", {
43
+ "assets": [
44
+ {
45
+ "path": "*.vsix",
46
+ "label": "Extension File"
47
+ },
48
+ ]
49
+ }],
50
+ ]
42
51
  }
43
52
  ```
44
53
 
45
- If `packageVsix` is set, will also generate a .vsix file at the set file path after publishing. If is a string, it will be used as value for `--out` of `vsce package`.
46
- It is recommended to upload this to your GitHub release page so your users can easily rollback to an earlier version if a version ever introduces a bad bug.
54
+ ## Configuration
55
+
56
+ | Option | Type | Description |
57
+ | -------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- |
58
+ | `packageVsix` | `boolean or string` | If set to true, plugin will generate a .vsix file at the set file path after publishing. If is a string, it will be used as value for `--out` of `vsce package`. <br /> It is recommended to upload this to your GitHub release page so your users can easily rollback to an earlier version if a version ever introduces a bad bug.|
59
+
60
+ ### Environment Variables
47
61
 
48
- #### Publishing to OpenVSX
62
+ | Variable | Description |
63
+ | -------------------------------------------------- | --------------------------------------------------------- |
64
+ | `VSCE_PAT`| **Required.** The personal access token to publish the extension of VS Code Marketplace|
65
+ | `OVSX_PAT`| *Optional* The personal access token to push to OpenVSX |
66
+
67
+ ### Publishing to OpenVSX
49
68
 
50
69
  Publishing extensions to OpenVSX using this plugin is easy:
51
70
 
@@ -55,13 +74,13 @@ Publishing extensions to OpenVSX using this plugin is easy:
55
74
 
56
75
  3. Enjoy! The plugin will automatically detect the environment variable and it will publish to OpenVSX, no additional configuration is needed.
57
76
 
58
- #### Working with older versions
77
+ ### Working with older versions
59
78
 
60
79
  This example is for `semantic-release` v15.
61
80
  Prior to v15, `prepare` was part of `publish` - if you are using v14, you must pass the `packageVsix` option to `publish` instead.
62
81
  Prior to v13, you had to override `getLastRelease` to use `@semantic-release/git` instead of the default `@semantic-release/npm`. This is no longer needed.
63
82
 
64
- #### Travis example
83
+ ### Travis example
65
84
 
66
85
  Secret environment variables: `VSCE_PAT`
67
86
 
@@ -89,3 +108,29 @@ jobs:
89
108
  node_js: '10.18'
90
109
  script: npm run semantic-release
91
110
  ```
111
+
112
+ ### Github Actions Example
113
+
114
+ ```yaml
115
+ name: CD:- Release Extension
116
+
117
+ on:
118
+ push:
119
+ branches: [master]
120
+
121
+ jobs:
122
+ Release:
123
+ runs-on: ubuntu-latest
124
+ steps:
125
+ - uses: actions/checkout@v2
126
+ - uses: actions/setup-node@v1
127
+ with:
128
+ node-version: 14
129
+ - name: Install Node Dependencies
130
+ run: npm ci
131
+ - name: Generate Semantic Release
132
+ run: yarn release
133
+ env:
134
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
135
+ VSCE_PAT: ${{ secrets.VSCE_PAT }}
136
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "semantic-release-vsce",
3
- "version": "5.0.7",
3
+ "version": "5.0.10",
4
4
  "description": "semantic-release plugin to package and publish VS Code extensions",
5
5
  "license": "MIT",
6
6
  "engines": {