Skip to content

Commit 883f101

Browse files
authored
🌱 bump dependencies (#33)
Signed-off-by: David Zager <david.j.zager@gmail.com>
1 parent bb3ddad commit 883f101

File tree

3 files changed

+119
-40
lines changed

3 files changed

+119
-40
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -398,42 +398,11 @@ jobs:
398398

399399
release:
400400
name: Create Release
401-
needs: [package, e2e-test]
402-
runs-on: ubuntu-latest
403-
if: ${{ startsWith(github.ref, 'refs/tags/') }}
404-
405-
steps:
406-
- name: Download VSIX artifact
407-
uses: actions/download-artifact@v4
408-
with:
409-
name: mta-vsix-artifact-${{ github.run_number }}
410-
path: ./artifacts
411-
412-
- name: Create GitHub release
413-
run: |
414-
VSIX_FILE=$(find ./artifacts -name "*.vsix" | head -1)
415-
RELEASE_NAME="${{ github.ref_name }}"
416-
417-
gh release create "${{ github.ref_name }}" \
418-
--title "MTA Extension $RELEASE_NAME" \
419-
--notes "Migration Toolkit for Applications extension release $RELEASE_NAME
420-
421-
## Installation
422-
Download the .vsix file and install using 'Extensions: Install from VSIX...' in VS Code.
423-
424-
## Changes
425-
See the full changelog in the repository." \
426-
"$VSIX_FILE"
427-
env:
428-
GITHUB_TOKEN: ${{ github.token }}
429-
430-
# TODO: Add marketplace publishing when ready
431-
# - name: Publish to VS Code Marketplace
432-
# run: npx vsce publish --packagePath "$VSIX_FILE"
433-
# env:
434-
# VSCE_PAT: ${{ secrets.VSCE_PAT }}
435-
436-
# - name: Publish to Open VSX
437-
# run: npx ovsx publish "$VSIX_FILE"
438-
# env:
439-
# OVSX_PAT: ${{ secrets.OVSX_PAT }}
401+
needs: e2e-test
402+
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
403+
uses: ./.github/workflows/release.yml
404+
with:
405+
tag_name: ${{ github.ref_name }}
406+
prerelease: ${{ contains(github.ref_name, '-') }}
407+
vsix_artifact_name: "vsix-artifact"
408+
secrets: inherit

.github/workflows/release.yml

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
name: Release
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
tag_name:
7+
description: "Tag name for the release"
8+
required: true
9+
type: string
10+
prerelease:
11+
description: "Is this a pre-release?"
12+
required: true
13+
type: boolean
14+
vsix_artifact_name:
15+
description: "Name of the VSIX artifact to download"
16+
required: false
17+
type: string
18+
default: "vsix-artifact"
19+
workflow_run_id:
20+
description: "Workflow run ID to download artifacts from"
21+
required: false
22+
type: string
23+
24+
env:
25+
HUSKY: 0
26+
27+
jobs:
28+
generate_changelog:
29+
name: Generate Changelog
30+
uses: konveyor/release-tools/.github/workflows/generate-changelog.yml@main
31+
with:
32+
version: ${{ inputs.tag_name }}
33+
prev_version: $(gh api repos/${{ github.repository }}/releases/latest | jq -r '.tag_name')
34+
repository: ${{ github.repository }}
35+
ref: ${{ github.sha }}
36+
secrets:
37+
token: ${{ secrets.GITHUB_TOKEN }}
38+
39+
release:
40+
name: Final Release
41+
runs-on: ubuntu-latest
42+
needs: generate_changelog
43+
steps:
44+
- name: Add release details to the step summary
45+
run: |
46+
cat >> "$GITHUB_STEP_SUMMARY" <<EOF
47+
## Release Information
48+
Tag: __${{ inputs.tag_name }}__
49+
Pre-Release: __${{ inputs.prerelease }}__
50+
VSIX Artifact: __${{ inputs.vsix_artifact_name }}__
51+
Workflow Run ID: __${{ inputs.workflow_run_id || github.run_id }}__
52+
EOF
53+
54+
- name: Checkout code
55+
uses: actions/checkout@v4
56+
57+
- name: Download Changelog Artifact
58+
uses: actions/download-artifact@v4
59+
with:
60+
name: changelog-artifact
61+
path: ./artifacts
62+
63+
- name: Download VSIX Artifact
64+
uses: actions/download-artifact@v4
65+
with:
66+
name: ${{ inputs.vsix_artifact_name }}
67+
path: ./artifacts
68+
69+
- name: Verify Downloaded Artifacts
70+
run: ls -R ./artifacts/
71+
72+
- name: Find and set VSIX filename
73+
id: vsix_info
74+
run: |
75+
VSIX_FILE=$(find ./artifacts -name "*.vsix" -type f | head -1)
76+
VSIX_NAME=$(basename "$VSIX_FILE")
77+
echo "vsix_path=$VSIX_FILE" >> "$GITHUB_OUTPUT"
78+
echo "vsix_name=$VSIX_NAME" >> "$GITHUB_OUTPUT"
79+
echo "Found VSIX: $VSIX_NAME at $VSIX_FILE"
80+
81+
- name: Set up Node.js for publishing
82+
uses: actions/setup-node@v4
83+
with:
84+
node-version-file: ".nvmrc"
85+
86+
- name: Publish to VS Code Marketplace
87+
if: ${{ inputs.prerelease == false }}
88+
run: |
89+
echo "Publishing ${{ steps.vsix_info.outputs.vsix_path }}"
90+
if [ -f "./artifacts/release.md" ]; then
91+
echo "Publishing with changelog"
92+
npx @vscode/vsce publish --packagePath "${{ steps.vsix_info.outputs.vsix_path }}" --changelog-path "./artifacts/release.md"
93+
else
94+
echo "Publishing without changelog (file not found)"
95+
npx @vscode/vsce publish --packagePath "${{ steps.vsix_info.outputs.vsix_path }}"
96+
fi
97+
env:
98+
VSCE_PAT: ${{ secrets.VSCODE_MARKETPLACE_TOKEN }}
99+
100+
- name: Create Release
101+
uses: ncipollo/release-action@v1
102+
with:
103+
tag: ${{ inputs.tag_name }}
104+
commit: ${{ github.sha }}
105+
bodyFile: ./artifacts/release.md
106+
artifacts: |
107+
${{ steps.vsix_info.outputs.vsix_path }}
108+
prerelease: ${{ inputs.prerelease }}
109+
env:
110+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

mta-build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
upstream:
22
repository: konveyor/editor-extensions
33
# Will be updated to specific SHA from release-0.2 branch
4-
ref: 7205d4fed6824e58f6b021c14e6ca3a7c42c3f4a
4+
ref: 780434f0d9727c5acf97d6b88f75ad2ce26ed83a
55
semanticRef: release-0.2
66

77
# Maybe useful later

0 commit comments

Comments
 (0)