switch to toml-cli with cargo binstall

This commit is contained in:
2024-10-01 18:06:02 -05:00
parent cc2c658c9c
commit 80d80a81e1
2 changed files with 5 additions and 6 deletions

View File

@@ -62,10 +62,9 @@ jobs:
- name: Run tests - name: Run tests
run: cargo test --verbose run: cargo test --verbose
- id: get_version - uses: cargo-bins/cargo-binstall@main
uses: mikefarah/yq@v4.44.3
with: - run: cargo binstall toml-cli -y && echo "PACKAGE_VERSION=$(toml get ./Cargo.toml package.version --raw)" >> $GITHUB_ENV
cmd: yq '.package.version' Cargo.toml
- name: Package Artifacts - name: Package Artifacts
shell: bash shell: bash
@@ -84,7 +83,7 @@ jobs:
cp target/${{ matrix.target }}/release/spotify-player-quickauth $stage/ cp target/${{ matrix.target }}/release/spotify-player-quickauth $stage/
cd $stage cd $stage
RELEASE_VERSION=v${{ steps.get_version.outputs.result }} RELEASE_VERSION=v${{ env.PACKAGE_VERSION }}
ARCHIVE="spotify-player-quickauth-$RELEASE_VERSION-${{ matrix.target }}.tar.gz" ARCHIVE="spotify-player-quickauth-$RELEASE_VERSION-${{ matrix.target }}.tar.gz"
tar czf "$ARCHIVE" ./spotify-player-quickauth tar czf "$ARCHIVE" ./spotify-player-quickauth
echo "ASSET_PATH=$ASSET_PATH" >> $GITHUB_ENV echo "ASSET_PATH=$ASSET_PATH" >> $GITHUB_ENV