Skip to content

Commit 233d3f0

Browse files
committed
Update the release packaging scripts to match the new CI flow
1 parent 1b3ccce commit 233d3f0

File tree

4 files changed

+25
-31
lines changed

4 files changed

+25
-31
lines changed

.github/workflows/_build.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,10 @@ jobs:
5858

5959
- name: Archive the binaries for release
6060
env:
61-
TARGET_DIR: ${{ matrix.plan.platform.buildTargetDir && format('{0}/release', matrix.plan.platform.buildTargetDir) || 'release' }}
62-
run: |
63-
./build-utils/package \
64-
target/build-package \
65-
"target/$TARGET_DIR" \
66-
""
61+
BUILD_TARGET_DIR: "target/${{ matrix.plan.platform.buildTargetDir && format('{0}/release', matrix.plan.platform.buildTargetDir) || 'release' }}"
62+
DEST_DIR: "target/build-archives"
63+
ARTIFACT_PREFIX: ""
64+
run: ./build-utils/archive-binaries
6765

6866
- name: Compute artifact name
6967
env:
@@ -76,11 +74,11 @@ jobs:
7674
uses: actions/upload-artifact@v6
7775
with:
7876
name: ${{ env.ARTIFACT_NAME }}
79-
path: target/build-package/archives/*.tar.gz
77+
path: target/build-archives/archives/*.tar.gz
8078

8179
- name: Upload release archive
8280
uses: shogo82148/actions-upload-release-asset@v1
8381
if: inputs.release-artifact-upload-url != ''
8482
with:
8583
upload_url: ${{ inputs.release-artifact-upload-url }}
86-
asset_path: target/build-package/archives/*.tar.gz
84+
asset_path: target/build-archives/archives/*.tar.gz

build-info/binaries

Lines changed: 0 additions & 18 deletions
This file was deleted.
Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#!/bin/bash
22
set -euo pipefail
33

4-
DEST_DIR="$1"
5-
BUILD_TARGET_DIR="$2"
6-
ARTIFACT_PREFIX="$3"
4+
DEST_DIR="${DEST_DIR?}"
5+
BUILD_TARGET_DIR="${BUILD_TARGET_DIR?}"
6+
ARTIFACT_PREFIX="${ARTIFACT_PREFIX?}"
77

8-
BUILD_ARCH="${BUILD_ARCH:-"$(rustc -vV | sed -n 's|host: ||p')"}"
8+
BUILD_ARCH="${BUILD_ARCH:-"$(rustc --print host-tuple)"}"
99

1010
if command -v grealpath &>/dev/null; then
1111
REALPATH="grealpath"
@@ -23,7 +23,11 @@ fi
2323

2424
cd "$(dirname "${BASH_SOURCE[0]}")/.."
2525

26-
source build-info/binaries
26+
BINARIES=()
27+
28+
while read -r BINARY; do
29+
BINARIES+=("$BINARY")
30+
done < <(build-utils/list-bin-targets)
2731

2832
mkdir -p "$DEST_DIR"
2933

build-utils/list-bin-targets

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
set -euo pipefail
3+
4+
cargo metadata --format-version 1 |
5+
jq -br '
6+
.workspace_members as $ws |
7+
.packages[] | select(.id as $id | $ws | contains([$id])) |
8+
.targets[] | select(.kind == ["bin"]) |
9+
.name
10+
'

0 commit comments

Comments
 (0)