Skip to content

Commit 07b2aec

Browse files
committed
Fix VSIX packaging process and update retention days for artifacts
1 parent 57d2ebc commit 07b2aec

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

.github/workflows/publish.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,26 +80,32 @@ jobs:
8080

8181
- name: Install vsce
8282
run: npm install -g @vscode/vsce
83-
83+
- name: Clean existing VSIX files
84+
run: rm -f *.vsix
85+
8486
- name: Package Extension
8587
run: vsce package
8688

8789
- name: Get Package Info
8890
id: package
8991
run: |
90-
VSIX_PATH=$(ls *.vsix)
92+
VERSION=$(node -p "require('./package.json').version")
93+
VSIX_PATH="simple-coding-time-tracker-${VERSION}.vsix"
94+
if [ ! -f "$VSIX_PATH" ]; then
95+
echo "Error: Expected VSIX file $VSIX_PATH not found"
96+
exit 1
97+
fi
9198
echo "Package created: $VSIX_PATH"
9299
echo "vsix_path=$VSIX_PATH" >> $GITHUB_OUTPUT
93100
echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
94-
VERSION=$(node -p "require('./package.json').version")
95101
echo "version=$VERSION" >> $GITHUB_OUTPUT
96102
97103
- name: Upload VSIX as artifact
98104
uses: actions/upload-artifact@v4
99105
with:
100106
name: extension-release-v${{ steps.package.outputs.version }}-${{ steps.package.outputs.date }}
101107
path: "*.vsix"
102-
retention-days: 400 # Maximum retention period allowed by GitHub
108+
retention-days: 99 # Maximum retention period allowed by GitHub
103109

104110
- name: Publish to Visual Studio Marketplace
105111
run: vsce publish -p "${{ secrets.VSC_PAT }}"

0 commit comments

Comments
 (0)