Skip to content

Commit ad495e0

Browse files
authored
Add support for publishing pre-release versions. Closes #127 (#132)
1 parent 1a5e232 commit ad495e0

File tree

3 files changed

+23
-4
lines changed

3 files changed

+23
-4
lines changed

.github/workflows/publish.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Publish
33
on:
44
release:
55
types:
6-
- created
6+
- created
77

88
jobs:
99
publish:
@@ -24,7 +24,24 @@ jobs:
2424
- name: Install VSCE
2525
run: npm install -g vsce
2626

27+
- name: Update package version and version default in package.json
28+
run: |
29+
TAG_NAME=${{ github.ref_name }}
30+
VERSION=${TAG_NAME#v}
31+
if [[ "$TAG_NAME" == *"-beta"* ]]; then
32+
jq --arg version "$VERSION" --arg default "beta" '.version = $version | .contributes.configuration.properties["dev-proxy-toolkit.version"].default = $default' package.json > package.tmp.json
33+
else
34+
jq --arg version "$VERSION" '.version = $version' package.json > package.tmp.json
35+
fi
36+
mv package.tmp.json package.json
37+
2738
- name: Publish
2839
env:
2940
VSCE_PAT: ${{ secrets.VSCE_PAT }}
30-
run: vsce publish
41+
run: |
42+
TAG_NAME=${{ github.ref_name }}
43+
if [[ "$TAG_NAME" == *"-beta"* ]]; then
44+
vsce publish --pre-release
45+
else
46+
vsce publish
47+
fi

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3434
### Changed:
3535

3636
- Setting: `devproxytoolkit.versionPreference` renamed to `dev-proxy-toolkit.version`
37+
- Workflow: Updated publish workflow to publish pre-release versions to marketplace
3738

3839
### Fixed:
3940

4041
- Code Lens: Fixed issue with documentation link shown for plugins with invalid names
4142
- Snippets: `devproxy-plugin-generic-random-error-file` changed to match schema
43+
- Readme: Updated information block to use correct formatting
4244

4345
## [0.8.0] - 2024-09-06
4446

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
The Dev Proxy Toolkit extension for Visual Studio Code makes it easy to create and update configuration files.
66

7-
> **IMPORTANT**
7+
> [!IMPORTANT]
88
>
9-
> Dev Proxy Toolkit is designed to be used with the latest version of Dev Proxy, 0.20.1. If you are using an earlier build some features may not work as intended.
9+
> Dev Proxy Toolkit is designed to be used with the latest version of Dev Proxy. If you are using an earlier build some features may not work as intended. You should update to the latest version.
1010
>
1111
1212
## Features

0 commit comments

Comments
 (0)