From 31bb3718142838cbf8746ac21035d305b9624cd1 Mon Sep 17 00:00:00 2001 From: Xevion Date: Wed, 24 Apr 2024 15:36:15 -0500 Subject: [PATCH] try: MacOS build with package version & target interpolation --- .github/workflows/build.yaml | 12 +++++++++--- Cargo.lock | 2 +- Cargo.toml | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 7208406..745e037 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -87,6 +87,8 @@ jobs: macos: runs-on: macos-13 + env: + TARGET: x86_64-apple-darwin steps: - name: Checkout @@ -98,7 +100,7 @@ jobs: - name: Setup Rust Toolchain (MacOS) uses: dtolnay/rust-toolchain@stable with: - target: x86_64-apple-darwin + target: ${{ env.TARGET }} - name: Rust Cache uses: Swatinem/rust-cache@v2 @@ -110,14 +112,18 @@ jobs: run: | mkdir /tmp/example/ cp ./target/release/spiritus /tmp/example/ - chmod a+x /tmp/example/spiritus mkdir /tmp/example/assets cp ./assets/TerminalVector.ttf ./assets/tetris.ogg ./assets/fruit.png /tmp/example/assets + + - name: Acquire Package Version + run: | + cargo install toml-cli + echo "PACKAGE_VERSION=$(toml get ./Cargo.toml package.version --raw)" >> $GITHUB_ENV - name: Upload Artifact uses: actions/upload-artifact@v4 with: - name: MacOS_x64 + name: "spiritus-${{ env.PACKAGE_VERSION }}-${{ env.TARGET }}" path: /tmp/example/ retention-days: 7 if-no-files-found: error diff --git a/Cargo.lock b/Cargo.lock index 588213b..8cf8d5b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -276,7 +276,7 @@ dependencies = [ [[package]] name = "spiritus" -version = "0.1.0" +version = "0.2.0" dependencies = [ "atty", "colors-transform", diff --git a/Cargo.toml b/Cargo.toml index 35ae306..0465c8b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "spiritus" -version = "0.1.0" +version = "0.2.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html