Skip to content

Commit 0692da9

Browse files
committed
Fix Windows PowerShell syntax in packaging step
1 parent 13e1bcf commit 0692da9

1 file changed

Lines changed: 13 additions & 9 deletions

File tree

.github/workflows/release.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,23 +83,27 @@ jobs:
8383
mkdir -p build
8484
go build -ldflags "-s -w -X main.version=${{ steps.version.outputs.version }} ${{ matrix.ldflags }}" -o build/mcpproxy${{ matrix.ext }} ./cmd/mcpproxy
8585
86-
- name: Package artifacts
86+
- name: Package artifacts (Linux/macOS)
87+
if: runner.os != 'Windows'
8788
run: |
8889
cd build
8990
cp ../README.md .
9091
if [ -f ../assets/icons/icon.svg ]; then
9192
mkdir -p assets/icons
9293
cp ../assets/icons/icon.svg assets/icons/
9394
fi
95+
${{ matrix.package_cmd }}
9496
95-
# Package based on OS
96-
if [[ "${{ matrix.goos }}" == "darwin" ]]; then
97-
${{ matrix.package_cmd }}
98-
elif [[ "${{ matrix.goos }}" == "windows" ]]; then
99-
${{ matrix.package_cmd }}
100-
else
101-
${{ matrix.package_cmd }}
102-
fi
97+
- name: Package artifacts (Windows)
98+
if: runner.os == 'Windows'
99+
run: |
100+
cd build
101+
Copy-Item ../README.md .
102+
if (Test-Path ../assets/icons/icon.svg) {
103+
New-Item -ItemType Directory -Force -Path assets/icons
104+
Copy-Item ../assets/icons/icon.svg assets/icons/
105+
}
106+
${{ matrix.package_cmd }}
103107
104108
- name: Upload artifacts to release
105109
uses: softprops/action-gh-release@v2

0 commit comments

Comments
 (0)