semantic-release-vsce 5.0.15 → 5.0.18
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/README.md +40 -69
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -9,22 +9,22 @@
|
|
|
9
9
|
[](https://david-dm.org/felipecrs/semantic-release-vsce?type=peer)
|
|
10
10
|
[](https://github.com/semantic-release/semantic-release)
|
|
11
11
|
|
|
12
|
-
| Step
|
|
13
|
-
|
|
14
|
-
| `verify`
|
|
15
|
-
| `prepare` | Generate the `.vsix` file using vsce, this can be be controlled by providing `packageVsix` in config. <br/>
|
|
16
|
-
| `publish` | Publish the extension|
|
|
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` environment variable is set, this step will still run_ |
|
|
16
|
+
| `publish` | Publish the extension |
|
|
17
17
|
|
|
18
18
|
## Install
|
|
19
19
|
|
|
20
|
-
```
|
|
20
|
+
```console
|
|
21
21
|
npm install --save-dev semantic-release-vsce
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
or
|
|
25
25
|
|
|
26
|
-
```
|
|
27
|
-
yarn add
|
|
26
|
+
```console
|
|
27
|
+
yarn add --dev semantic-release-vsce
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
## Usage
|
|
@@ -36,33 +36,39 @@ The plugin can be configured in the [**semantic-release** configuration file](ht
|
|
|
36
36
|
"plugins": [
|
|
37
37
|
"@semantic-release/commit-analyzer",
|
|
38
38
|
"@semantic-release/release-notes-generator",
|
|
39
|
-
[
|
|
39
|
+
[
|
|
40
|
+
"semantic-release-vsce",
|
|
41
|
+
{
|
|
40
42
|
"packageVsix": true
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
[
|
|
46
|
+
"@semantic-release/github",
|
|
47
|
+
{
|
|
48
|
+
"assets": [
|
|
49
|
+
{
|
|
50
|
+
"path": "*.vsix",
|
|
51
|
+
"label": "Extension File"
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
]
|
|
50
56
|
]
|
|
51
57
|
}
|
|
52
58
|
```
|
|
53
59
|
|
|
54
60
|
## Configuration
|
|
55
61
|
|
|
56
|
-
| Option
|
|
57
|
-
|
|
|
58
|
-
| `packageVsix` | `boolean or string`
|
|
62
|
+
| Option | Type | Description |
|
|
63
|
+
| ------------- | --------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
|
|
64
|
+
| `packageVsix` | `boolean` or `string` | If set to `true`, the plugin will generate a `.vsix` file. If is a string, it will be used as value for `--out` of `vsce package`. |
|
|
59
65
|
|
|
60
66
|
### Environment Variables
|
|
61
67
|
|
|
62
|
-
| Variable
|
|
63
|
-
|
|
|
64
|
-
| `VSCE_PAT
|
|
65
|
-
| `OVSX_PAT
|
|
68
|
+
| Variable | Description |
|
|
69
|
+
| ---------- | --------------------------------------------------------------------------------------- |
|
|
70
|
+
| `VSCE_PAT` | **Required**. The personal access token to publish the extension of VS Code Marketplace |
|
|
71
|
+
| `OVSX_PAT` | _Optional_. The personal access token to push to OpenVSX |
|
|
66
72
|
|
|
67
73
|
### Publishing to OpenVSX
|
|
68
74
|
|
|
@@ -72,64 +78,29 @@ Publishing extensions to OpenVSX using this plugin is easy:
|
|
|
72
78
|
|
|
73
79
|
2. Configure the `OVSX_PAT` environment variable in your CI with the token that you created.
|
|
74
80
|
|
|
75
|
-
3.
|
|
76
|
-
|
|
77
|
-
### Working with older versions
|
|
78
|
-
|
|
79
|
-
This example is for `semantic-release` v15.
|
|
80
|
-
Prior to v15, `prepare` was part of `publish` - if you are using v14, you must pass the `packageVsix` option to `publish` instead.
|
|
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.
|
|
82
|
-
|
|
83
|
-
### Travis example
|
|
84
|
-
|
|
85
|
-
Secret environment variables: `VSCE_PAT`
|
|
86
|
-
|
|
87
|
-
Example:
|
|
88
|
-
|
|
89
|
-
```yaml
|
|
90
|
-
# .travis.yml
|
|
91
|
-
|
|
92
|
-
cache:
|
|
93
|
-
directories:
|
|
94
|
-
- ~/.npm
|
|
95
|
-
|
|
96
|
-
script:
|
|
97
|
-
- npm test
|
|
98
|
-
|
|
99
|
-
stages:
|
|
100
|
-
- test
|
|
101
|
-
- name: release
|
|
102
|
-
if: branch = master AND type = push AND fork = false
|
|
103
|
-
|
|
104
|
-
jobs:
|
|
105
|
-
include:
|
|
106
|
-
- stage: release
|
|
107
|
-
language: node_js
|
|
108
|
-
node_js: '10.18'
|
|
109
|
-
script: npm run semantic-release
|
|
110
|
-
```
|
|
81
|
+
3. The plugin will automatically detect the environment variable and it will publish to OpenVSX, no additional configuration is needed. Enjoy!
|
|
111
82
|
|
|
112
83
|
### Github Actions Example
|
|
113
84
|
|
|
114
85
|
```yaml
|
|
115
|
-
name:
|
|
86
|
+
name: release
|
|
116
87
|
|
|
117
88
|
on:
|
|
118
89
|
push:
|
|
119
90
|
branches: [master]
|
|
120
91
|
|
|
121
92
|
jobs:
|
|
122
|
-
|
|
93
|
+
release:
|
|
123
94
|
runs-on: ubuntu-latest
|
|
124
95
|
steps:
|
|
125
|
-
- uses: actions/checkout@
|
|
126
|
-
- uses: actions/setup-node@
|
|
96
|
+
- uses: actions/checkout@v3
|
|
97
|
+
- uses: actions/setup-node@v3
|
|
127
98
|
with:
|
|
128
|
-
node-version:
|
|
99
|
+
node-version: 16
|
|
129
100
|
- name: Install Node Dependencies
|
|
130
101
|
run: npm ci
|
|
131
|
-
- name:
|
|
132
|
-
run:
|
|
102
|
+
- name: Release
|
|
103
|
+
run: npx semantic-release
|
|
133
104
|
env:
|
|
134
105
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
135
106
|
VSCE_PAT: ${{ secrets.VSCE_PAT }}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "semantic-release-vsce",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.18",
|
|
4
4
|
"description": "semantic-release plugin to package and publish VS Code extensions",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
]
|
|
46
46
|
},
|
|
47
47
|
"volta": {
|
|
48
|
-
"node": "16.
|
|
49
|
-
"npm": "8.
|
|
48
|
+
"node": "16.15.1",
|
|
49
|
+
"npm": "8.12.1"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@semantic-release/error": "^3.0.0",
|
|
@@ -64,9 +64,9 @@
|
|
|
64
64
|
"ava": "^4.0.1",
|
|
65
65
|
"conventional-changelog-conventionalcommits": "^5.0.0",
|
|
66
66
|
"eslint": "^8.7.0",
|
|
67
|
-
"eslint-config-standard": "^17.0.0
|
|
67
|
+
"eslint-config-standard": "^17.0.0",
|
|
68
68
|
"eslint-plugin-import": "^2.20.1",
|
|
69
|
-
"eslint-plugin-n": "^
|
|
69
|
+
"eslint-plugin-n": "^15.2.1",
|
|
70
70
|
"eslint-plugin-promise": "^6.0.0",
|
|
71
71
|
"husky": "^8.0.1",
|
|
72
72
|
"nyc": "^15.1.0",
|