From 0ab225a814b79ccfa53224690073c0c6ee2c7264 Mon Sep 17 00:00:00 2001 From: Flat Date: Sun, 26 Nov 2023 16:03:37 -0500 Subject: [PATCH 1/4] ci: fix artifacts --- .github/workflows/build-and-test.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index fee42b6a3..d7a24c009 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -91,18 +91,14 @@ jobs: OUCH_ARTIFACTS_FOLDER: artifacts RUSTFLAGS: -C strip=symbols - - name: Upload binary + - name: Upload artifacts uses: actions/upload-artifact@v3 with: name: ouch-${{ matrix.target }}${{ matrix.ext }} - path: target/${{ matrix.target }}/release/ouch${{ matrix.ext }} + path: | + target/${{ matrix.target }}/release/ouch${{ matrix.ext }} + artifacts/ - - name: Upload artifacts (musl) - if: matrix.target == 'x86_64-unknown-linux-musl' - uses: actions/upload-artifact@v3 - with: - name: artifacts - path: artifacts clippy-rustfmt: name: clippy-rustfmt From b97c174dad712ee5c1be336b396f65848cf679ba Mon Sep 17 00:00:00 2001 From: Flat Date: Sun, 26 Nov 2023 16:15:54 -0500 Subject: [PATCH 2/4] ci: fix package-release-assets.sh --- scripts/package-release-assets.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/package-release-assets.sh b/scripts/package-release-assets.sh index d9875abb7..6195aba47 100755 --- a/scripts/package-release-assets.sh +++ b/scripts/package-release-assets.sh @@ -6,10 +6,11 @@ mkdir release cd artifacts for dir in ouch-*; do - cp -r artifacts "$dir/completions" + cp -r "$dir/artifacts" "$dir/completions" mkdir "$dir/man" mv "$dir"/completions/*.1 "$dir/man" cp ../{README.md,LICENSE,CHANGELOG.md} "$dir" + rm -r "$dir/artifacts" if [[ "$dir" = *.exe ]]; then target=${dir%.exe} From 69588d248fedc5b1b247f20491ffdc895574f12e Mon Sep 17 00:00:00 2001 From: Flat Date: Sun, 26 Nov 2023 16:36:24 -0500 Subject: [PATCH 3/4] ci: fix artifacts for non x86_64 linux --- Cross.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cross.toml b/Cross.toml index 1a4557b51..f9c026f64 100644 --- a/Cross.toml +++ b/Cross.toml @@ -1,2 +1,2 @@ [build.env] -passthrough = ["RUSTFLAGS"] +passthrough = ["RUSTFLAGS", "OUCH_ARTIFACTS_FOLDER"] From 8b8ab42f0c6bcf9b139a4dd82cf5aec9316fb549 Mon Sep 17 00:00:00 2001 From: Flat Date: Sun, 26 Nov 2023 17:04:03 -0500 Subject: [PATCH 4/4] ci: fix release script --- scripts/package-release-assets.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/package-release-assets.sh b/scripts/package-release-assets.sh index 6195aba47..c2e1ba9cb 100755 --- a/scripts/package-release-assets.sh +++ b/scripts/package-release-assets.sh @@ -9,14 +9,19 @@ for dir in ouch-*; do cp -r "$dir/artifacts" "$dir/completions" mkdir "$dir/man" mv "$dir"/completions/*.1 "$dir/man" + cp ../{README.md,LICENSE,CHANGELOG.md} "$dir" rm -r "$dir/artifacts" if [[ "$dir" = *.exe ]]; then target=${dir%.exe} + mv "$dir/target/${target/ouch-/}/release/ouch.exe" "$dir" + rm -r "$dir/target" mv "$dir" "$target" zip -r "../release/$target.zip" "$target" else + mv "$dir/target/${dir/ouch-/}/release/ouch" "$dir" + rm -r "$dir/target" chmod +x "$dir/ouch" tar czf "../release/$dir.tar.gz" "$dir" fi