From 81600312acdc847f00c55dc2432f6e2cb4194141 Mon Sep 17 00:00:00 2001 From: Ellen Marie Dash Date: Tue, 15 Oct 2024 20:45:25 -0400 Subject: [PATCH] [workflows/tests] try using exit codes instead of env vars, like i should've done originally. --- .github/workflows/tests.yml | 13 +++++-------- Cargo.toml | 2 +- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 601a045..2963dc5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -28,18 +28,15 @@ jobs: with: submodules: recursive - name: Check if version in Cargo.toml has changed - id: project + id: version_changed run: | - git rev-parse HEAD - git diff-tree -r -G'^version ?= ?"*"' --exit-code HEAD Cargo.toml && VERSION_CHANGED=0 || VERSION_CHANGED=1 - echo "VERSION_CHANGED=${VERSION_CHANGED}" - echo "VERSION_CHANGED=${VERSION_CHANGED}" >> "$GITHUB_ENV" + ! git diff-tree -r -G'^version ?= ?"*"' --exit-code HEAD Cargo.toml - name: Install Rust - if: steps.project.VERSION_CHANGED == '1' + if: steps.version_changed.status == 'success' run: rustup update - name: Install cargo-release - if: steps.project.VERSION_CHANGED == '1' + if: steps.version_changed.status == 'success' run: cargo install cargo-release - name: Run cargo-release - if: steps.project.VERSION_CHANGED == '1' + if: steps.version_changed.status == 'success' run: cargo release --execute diff --git a/Cargo.toml b/Cargo.toml index cd2a68f..60e17cb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "stayfocused" -version = "0.3.8" +version = "0.3.9" description = "Software To Avoid [Y] Fixating On Completely Unproductive Shit Every Day" repository = "https://github.com/duckinator/STAYFOCUSED"