Skip to content

Commit 6004294

Browse files
committed
Update workflow to support release creation on tag push
1 parent ae80030 commit 6004294

File tree

1 file changed

+9
-41
lines changed

1 file changed

+9
-41
lines changed

.github/workflows/publish.yaml

Lines changed: 9 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,8 @@ name: Build and Publish DXT
33
on:
44
push:
55
branches: [ dxt ]
6-
tags: [ 'dxt-v*' ] # Add this line
7-
workflow_dispatch: # Allows manual triggering
8-
inputs:
9-
create_release:
10-
description: 'Create a GitHub release'
11-
required: false
12-
default: false
13-
type: boolean
14-
release_version:
15-
description: 'Release version (e.g., v1.0.0)'
16-
required: false
17-
default: ''
18-
type: string
6+
tags:
7+
- 'v*'
198

209
jobs:
2110
build:
@@ -41,39 +30,18 @@ jobs:
4130
- name: Pack DXT
4231
run: dxt pack
4332

44-
- name: Upload DXT package (artifact)
33+
- name: Upload DXT package
34+
if: github.ref_type == 'branch'
4535
uses: actions/upload-artifact@v4
4636
with:
4737
name: mcp-jetbrains-dxt
4838
path: mcp-jetbrains.dxt
4939

50-
- name: Determine release tag
51-
id: release_info
52-
if: github.event.inputs.create_release == 'true' || github.event_name == 'push'
53-
run: |
54-
if [ "${{ github.event.inputs.release_version }}" != "" ]; then
55-
TAG="dxt-${{ github.event.inputs.release_version }}"
56-
else
57-
TIMESTAMP=$(date +"%Y%m%d-%H%M%S")
58-
TAG="dxt-auto-${TIMESTAMP}"
59-
fi
60-
echo "tag=${TAG}" >> $GITHUB_OUTPUT
61-
echo "Release tag: ${TAG}"
62-
6340
- name: Create Release
64-
if: steps.release_info.outputs.tag != ''
65-
uses: softprops/action-gh-release@v2
41+
if: github.ref_type == 'tag'
42+
uses: softprops/action-gh-release@v1
6643
with:
67-
tag_name: ${{ steps.release_info.outputs.tag }}
68-
name: "DXT Release ${{ steps.release_info.outputs.tag }}"
69-
body: |
70-
DXT build from branch `dxt`
71-
72-
**Commit:** ${{ github.sha }}
73-
**Author:** ${{ github.actor }}
74-
**Manual Release:** ${{ github.event.inputs.create_release == 'true' }}
75-
76-
Download the `mcp-jetbrains.dxt` file below.
7744
files: mcp-jetbrains.dxt
78-
prerelease: true
79-
generate_release_notes: true
45+
tag_name: ${{ github.ref_name }}
46+
name: Release ${{ github.ref_name }}
47+
generate_release_notes: false

0 commit comments

Comments
 (0)