diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml index c7a6b4cb4..cef2bba4e 100644 --- a/.github/workflows/perf.yml +++ b/.github/workflows/perf.yml @@ -37,7 +37,7 @@ jobs: fi for i in 1 2 3 do - curl -sf https://binaries.nats.dev/nats-io/nats-server/v2@${{ matrix.config.branch }} | PREFIX=. sh && break || sleep 30 + curl -sf https://binaries.nats.dev/nats-io/nats-server/v2@$branch | PREFIX=. sh && break || sleep 30 done sudo mv nats-server /usr/local/bin diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4c7d4a61d..280d626bd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,8 +13,8 @@ jobs: fail-fast: false matrix: config: - - branch: 'v2.9.22' - - branch: 'v2.10.9' + - branch: 'v2.9' + - branch: 'latest' - branch: 'main' runs-on: ubuntu-latest env: @@ -24,9 +24,16 @@ jobs: steps: - name: Install nats-server run: | + gh_api_url="https://api.github.com/repos/nats-io/nats-server/releases" + branch="${{ matrix.config.branch }}" + if [[ $branch == "v"* ]]; then + branch=$(curl -s $gh_api_url | jq -r '.[].tag_name' | grep $branch | sort -V | tail -1) + elif [[ $branch == "latest" ]]; then + branch=$(curl -s $gh_api_url/latest | jq -r .tag_name) + fi for i in 1 2 3 do - curl -sf https://binaries.nats.dev/nats-io/nats-server/v2@${{ matrix.config.branch }} | PREFIX=. sh && break || sleep 30 + curl -sf https://binaries.nats.dev/nats-io/nats-server/v2@$branch | PREFIX=. sh && break || sleep 30 done sudo mv nats-server /usr/local/bin