Skip to content

Commit a7fa46b

Browse files
committed
Refactor GitHub Actions workflow to improve artifact organization
- Updated artifact upload names for clarity by removing "archive" prefix. - Reorganized file handling to create a flat structure for release files, avoiding duplicates. - Enhanced listing of files to be uploaded for better visibility in the release process.
1 parent fb513f8 commit a7fa46b

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

.github/workflows/release.yml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,13 @@ jobs:
9999
- name: Upload versioned archive artifact
100100
uses: actions/upload-artifact@v4
101101
with:
102-
name: archive-versioned-${{ matrix.goos }}-${{ matrix.goarch }}
102+
name: versioned-${{ matrix.goos }}-${{ matrix.goarch }}
103103
path: mcpproxy-*-${{ matrix.goos }}-${{ matrix.goarch }}.${{ matrix.archive_format }}
104104

105105
- name: Upload latest archive artifact
106106
uses: actions/upload-artifact@v4
107107
with:
108-
name: archive-latest-${{ matrix.goos }}-${{ matrix.goarch }}
108+
name: latest-${{ matrix.goos }}-${{ matrix.goarch }}
109109
path: mcpproxy-latest-${{ matrix.goos }}-${{ matrix.goarch }}.${{ matrix.archive_format }}
110110

111111
release:
@@ -123,16 +123,24 @@ jobs:
123123
with:
124124
path: dist
125125

126-
- name: List artifacts
126+
- name: Reorganize files
127127
run: |
128-
echo "Downloaded artifacts:"
129-
find dist -type f -name "*mcpproxy*" -exec ls -la {} \;
128+
# Create a flat structure to avoid duplicates
129+
mkdir -p release-files
130+
find dist -name "*.tar.gz" -o -name "*.zip" | while read file; do
131+
filename=$(basename "$file")
132+
cp "$file" "release-files/$filename"
133+
done
134+
135+
- name: List files for upload
136+
run: |
137+
echo "Files to upload:"
138+
ls -la release-files/
130139
131140
- name: Create release with binaries
132141
uses: softprops/action-gh-release@v2
133142
with:
134-
files: |
135-
dist/*/*
143+
files: release-files/*
136144
body: |
137145
## mcpproxy ${{ github.ref_name }}
138146

0 commit comments

Comments
 (0)