File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7373 echo "exists=false" >> "${GITHUB_OUTPUT}"
7474 fi
7575
76+
7677 - name : Create and push tag
7778 if : steps.version.outputs.changed == 'true' && steps.tag_exists.outputs.exists == 'false'
7879 shell : bash
8485 git tag -a "${TAG_NAME}" -m "Release ${TAG_NAME}"
8586 git push origin "${TAG_NAME}"
8687
88+ - name : Build VSIX
89+ if : steps.version.outputs.changed == 'true' && steps.tag_exists.outputs.exists == 'false'
90+ shell : bash
91+ run : |
92+ set -euo pipefail
93+ npm ci
94+ npm run package:vsix
95+
96+ - name : Extract changelog for release
97+ id : changelog
98+ if : steps.version.outputs.changed == 'true' && steps.tag_exists.outputs.exists == 'false'
99+ shell : bash
100+ run : |
101+ set -euo pipefail
102+ VERSION="${{ steps.version.outputs.current }}"
103+ # Escape dots for regex matching
104+ ESCAPED_VERSION="${VERSION//\./\\.}"
105+ # Extract lines between "## [VERSION]" and next "## ["
106+ awk "/^## \[${ESCAPED_VERSION}\]/{flag=1; next} /^## \[/{flag=0} flag" CHANGELOG.md > /tmp/release_body.md
107+ echo "file=/tmp/release_body.md" >> "${GITHUB_OUTPUT}"
108+
109+ - name : Create Release and upload VSIX
110+ if : steps.version.outputs.changed == 'true' && steps.tag_exists.outputs.exists == 'false'
111+ shell : bash
112+ env :
113+ GH_TOKEN : ${{ github.token }}
114+ run : |
115+ set -euo pipefail
116+ VSIX_FILE="$(ls *.vsix | head -1)"
117+ if [[ -z "${VSIX_FILE}" ]]; then
118+ echo "No .vsix file found after build"
119+ exit 1
120+ fi
121+ gh release create "${{ steps.version.outputs.tag }}" \
122+ --title "Release ${{ steps.version.outputs.tag }}" \
123+ --notes-file "${{ steps.changelog.outputs.file }}" \
124+ "${VSIX_FILE}"
125+
87126 - name : Summary
88127 shell : bash
89128 run : |
You can’t perform that action at this time.
0 commit comments