Skip to content

Commit f41482f

Browse files
committed
fix
1 parent e45ac5e commit f41482f

File tree

3 files changed

+17
-11
lines changed

3 files changed

+17
-11
lines changed

.github/workflows/build-binaries.yml

+13-9
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ jobs:
6262
echo XDG_BIN_HOME="${{ runner.temp }}/.local/bin"
6363
echo CARGO_HOME="${{ runner.temp }}/.cargo"
6464
echo PYTHONUSERBASE="${{ runner.temp }}/.local"
65+
echo DIST_DIR="${{ runner.temp }}/dist"
6566
} >> "$GITHUB_ENV"
6667
{
6768
echo "${{ runner.temp }}/.local/bin"
@@ -90,20 +91,23 @@ jobs:
9091
- name: Archive binary for Unix-like systems
9192
if: ${{ !contains(matrix.target, 'windows-msvc') }}
9293
run: |
93-
DIST_DIR="${{ runner.temp }}/dist"
9494
archive_name="${{ env.APP_NAME }}-${{ matrix.target }}"
95-
ARCHIVE_DIR="$DIST_DIR/$archive_name"
96-
ARCHIVE_FILE="$archive_name.tar.gz"
95+
archive_dir="${DIST_DIR:?}/$archive_name"
96+
archive_file="$archive_name.tar.gz"
9797
98-
mkdir -p "$ARCHIVE_DIR"
99-
cp "target/${{ matrix.target }}/release/${{ env.APP_NAME }}" "$ARCHIVE_DIR/${{ env.APP_NAME }}"
100-
tar czvf "$ARCHIVE_FILE" "$ARCHIVE_DIR"
101-
shasum -a 256 "$ARCHIVE_FILE" > "$ARCHIVE_FILE.sha256"
98+
mkdir -p "$archive_dir"
99+
cp "target/${{ matrix.target }}/release/${{ env.APP_NAME }}" \
100+
"$archive_dir/${{ env.APP_NAME }}"
101+
102+
pushd "${DIST_DIR:?}"
103+
tar czvf "$archive_file" "$archive_name"
104+
shasum -a 256 "$archive_file" > "$archive_file.sha256"
105+
popd
102106
- name: Upload artifacts
103107
uses: actions/upload-artifact@v4
104108
with:
105109
name: artifacts-${{ matrix.target }}
106110
retention-days: 1
107111
path: |
108-
*.tar.gz
109-
*.sha256
112+
${{ env.DIST_DIR }}/*.tar.gz
113+
${{ env.DIST_DIR }}/*.sha256

Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ members = ["crates/*", "examples/*"]
33
resolver = "2"
44

55
[workspace.package]
6-
version = "0.0.3"
6+
version = "0.0.4"
77
edition = "2021"
88
rust-version = "1.83"
99
description = "cdk-ansible is a tool to generate Ansible playbooks from Rust code."
@@ -16,7 +16,7 @@ license = "MIT"
1616
[workspace.dependencies]
1717
cdk-ansible = { path = "crates/cdk-ansible" }
1818
# should be the same as the version of 'cdk-ansible' crate
19-
cdk-ansible-cli = { version = "0.0.3", path = "crates/cdk-ansible-cli" }
19+
cdk-ansible-cli = { version = "0.0.4", path = "crates/cdk-ansible-cli" }
2020
cdk-ansible-core = { version = "0.0.2", path = "crates/cdk-ansible-core" }
2121
cdk-ansible-static = { version = "0.0.1", path = "crates/cdk-ansible-static" }
2222
cdk-ansible-macro = { version = "0.0.2", path = "crates/cdk-ansible-macro" }

dist-workspace.toml

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ members = ["cargo:."]
77
cargo-dist-version = "0.28.0"
88
# CI backends to support
99
ci = "github"
10+
# The archive format to use for non-windows builds (defaults .tar.xz)
11+
unix-archive = ".tar.gz"
1012
# The installers to generate for each app
1113
installers = ["shell"]
1214
# Target platforms to build apps for (Rust target-triple syntax)

0 commit comments

Comments
 (0)