Skip to content

Commit 2650976

Browse files
committed
artifact management
- Added date and version information to the output of the package info step in both build and publish workflows. - Updated the artifact upload step to include the version and date in the artifact name for better traceability. - Increased the retention period for the build workflow artifact from 5 to 7 days.
1 parent 9dbdc19 commit 2650976

2 files changed

Lines changed: 13 additions & 9 deletions

File tree

.github/workflows/build.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,17 @@ jobs:
3333
- name: Package Extension
3434
run: vsce package
3535

36-
- name: Upload VSIX as artifact
37-
uses: actions/upload-artifact@v4
38-
with:
39-
name: extension
40-
path: "*.vsix"
41-
retention-days: 5
42-
4336
- name: Get Package Info
4437
id: package
4538
run: |
4639
VSIX_PATH=$(ls *.vsix)
4740
echo "Package created: $VSIX_PATH"
48-
echo "vsix_path=$VSIX_PATH" >> $GITHUB_OUTPUT
41+
echo "vsix_path=$VSIX_PATH" >> $GITHUB_OUTPUT
42+
echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
43+
44+
- name: Upload VSIX as artifact
45+
uses: actions/upload-artifact@v4
46+
with:
47+
name: extension-test-${{ steps.package.outputs.date }}
48+
path: "*.vsix"
49+
retention-days: 7

.github/workflows/publish.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,14 @@ jobs:
4040
VSIX_PATH=$(ls *.vsix)
4141
echo "Package created: $VSIX_PATH"
4242
echo "vsix_path=$VSIX_PATH" >> $GITHUB_OUTPUT
43+
echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
44+
VERSION=$(node -p "require('./package.json').version")
45+
echo "version=$VERSION" >> $GITHUB_OUTPUT
4346
4447
- name: Upload VSIX as artifact
4548
uses: actions/upload-artifact@v4
4649
with:
47-
name: extension-release
50+
name: extension-release-v${{ steps.package.outputs.version }}-${{ steps.package.outputs.date }}
4851
path: "*.vsix"
4952
retention-days: 400 # Maximum retention period allowed by GitHub
5053

0 commit comments

Comments
 (0)