Skip to content

Commit

Permalink
ci: get version from installed package
Browse files Browse the repository at this point in the history
  • Loading branch information
wangl-cc committed Nov 27, 2023
1 parent a42a3bf commit fa38553
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,13 @@ jobs:
env:
MAA_CONFIG_DIR: ${{ github.workspace }}/config_examples
run: |
cargo run -- install beta -t0
cargo run -- install stable
ls -l "$(cargo run -- dir library)"
ls -l "$(cargo run -- dir resource)"
wget "$(yq -oy '.core.api_url' $MAA_CONFIG_DIR/cli.toml)/beta.json"
version="$(yq -oy '.version' beta.json)"
package_name=$(basename $(cargo run -- dir cache)/MAA-v*)
version=${package_name#MAA-v}
version=${version%%-*}
echo "Installed MaaCore version: $version"
echo "MAA_CORE_VERSION=$version" >> $GITHUB_ENV
- name: Test
if: matrix.arch == 'x86_64'
Expand Down

0 comments on commit fa38553

Please sign in to comment.