Skip to content

Commit ce0662f

Browse files
committed
chore: update ci.yml
1 parent 0c91eae commit ce0662f

2 files changed

Lines changed: 10 additions & 38 deletions

File tree

.github/workflows/ci.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@ jobs:
145145
name: pgrollback-windows-amd64-cross
146146
path: bin/pgrollback.exe
147147

148-
build:
149-
name: Build pgrollback binary
148+
build-linux:
149+
name: Build pgrollback linux binary
150150
runs-on: ubuntu-latest
151151
needs: test
152152
if: startsWith(github.ref, 'refs/tags/') # only build when the commit is a tag
@@ -176,7 +176,7 @@ jobs:
176176
release:
177177
name: Create Release and upload binaries
178178
runs-on: ubuntu-latest
179-
needs: [build, build-windows]
179+
needs: [build-linux, build-windows]
180180
if: startsWith(github.ref, 'refs/tags/')
181181
permissions:
182182
contents: write
@@ -199,9 +199,13 @@ jobs:
199199
run: |
200200
TAG="${GITHUB_REF#refs/tags/}"
201201
mkdir -p release
202-
# Artifact may be at root or under bin/ depending on upload-artifact behavior
203-
mv "bin/pgrollback" "release/pgrollback-${TAG}-linux-amd64"
204-
mv "bin/pgrollback.exe" "release/pgrollback-${TAG}-windows-amd64.exe"
202+
# Each artifact extracts into a folder named after the artifact; binary may be at root or under bin/
203+
LINUX_BIN=pgrollback-linux-amd64/pgrollback
204+
[ -f pgrollback-linux-amd64/bin/pgrollback ] && LINUX_BIN=pgrollback-linux-amd64/bin/pgrollback
205+
WIN_BIN=pgrollback-windows-amd64/pgrollback.exe
206+
[ -f pgrollback-windows-amd64/bin/pgrollback.exe ] && WIN_BIN=pgrollback-windows-amd64/bin/pgrollback.exe
207+
mv "$LINUX_BIN" "release/pgrollback-${TAG}-linux-amd64"
208+
mv "$WIN_BIN" "release/pgrollback-${TAG}-windows-amd64.exe"
205209
ls -la release/
206210
207211
- name: Create Release and upload assets

.github/workflows/release.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)