Skip to content

Commit d3d80eb

Browse files
Copilotbendera
andcommitted
Add v1.10.0 version bump and create-release workflow
Co-authored-by: bendera <3748508+bendera@users.noreply.github.com>
1 parent f9a6f90 commit d3d80eb

File tree

3 files changed

+49
-3
lines changed

3 files changed

+49
-3
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Create Draft Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- package.json
9+
10+
jobs:
11+
create-draft-release:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: write
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Get version from package.json
21+
id: version
22+
run: echo "version=v$(node -p "require('./package.json').version")" >> "$GITHUB_OUTPUT"
23+
24+
- name: Check if tag already exists
25+
id: check_tag
26+
run: |
27+
if git ls-remote --tags origin | grep -q "^refs/tags/${{ steps.version.outputs.version }}$"; then
28+
echo "exists=true" >> "$GITHUB_OUTPUT"
29+
else
30+
echo "exists=false" >> "$GITHUB_OUTPUT"
31+
fi
32+
33+
- name: Create tag and draft release
34+
if: steps.check_tag.outputs.exists == 'false'
35+
env:
36+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
run: |
38+
VERSION="${{ steps.version.outputs.version }}"
39+
git config user.name "github-actions[bot]"
40+
git config user.email "github-actions[bot]@users.noreply.github.com"
41+
git tag "$VERSION"
42+
git push origin "$VERSION"
43+
gh release create "$VERSION" \
44+
--draft \
45+
--title "$VERSION" \
46+
--generate-notes

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@vscode-elements/webview-playground",
3-
"version": "1.9.0",
3+
"version": "1.10.0",
44
"description": "Handy web components for emulating the VSCode Webview environment.",
55
"type": "module",
66
"main": "./dist/index.js",

0 commit comments

Comments
 (0)