From 7234283bf8c35150b330afc913b2cb8e505960c2 Mon Sep 17 00:00:00 2001 From: Mohsen Azimi Date: Sat, 18 Jan 2025 22:05:23 +0700 Subject: [PATCH 1/2] feat: add release profile optimizations --- Cargo.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 8134a23..0843020 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,3 +16,9 @@ thiserror = "1.0" assert_cmd = "2.0" predicates = "2.0" tempfile = "3.8" + +[profile.release] +lto = true +codegen-units = 1 +strip = true # Strip symbols from binary +opt-level = 3 # Maximum optimization From 0e981efdf0dfcd5d72a2b5d16aeb27bb19469725 Mon Sep 17 00:00:00 2001 From: Mohsen Azimi Date: Sat, 18 Jan 2025 22:10:03 +0700 Subject: [PATCH 2/2] fix: do not push if no changes to public download script is made --- .github/workflows/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 043e3c1..8422c82 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -134,6 +134,7 @@ jobs: *.tar.gz *.zip - name: Copy installation script to bodo.run + if: steps.semantic.outputs.new_release_published == 'true' run: | git config --global user.name 'github-actions[bot]' git config --global user.email 'github-actions[bot]@users.noreply.github.com' @@ -144,6 +145,11 @@ jobs: BODO_COMMIT_MESSAGE=$(git log -1 --pretty=%B) cd bodo-run.github.io git add public/stop-nagging.sh public/stop-nagging.ps1 + # Exit with 0 if no changes + if git diff --exit-code; then + echo "No changes to commit" + exit 0 + fi git commit -m "Update stop-nagging installation scripts" \ -m "" \ -m "$BODO_COMMIT_MESSAGE" \