diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 093c86c..de90746 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -25,6 +25,7 @@ jobs: run: shell: bash strategy: + max-parallel: 1 matrix: system: - ubuntu-latest @@ -49,6 +50,7 @@ jobs: run: shell: bash strategy: + max-parallel: 1 matrix: system: - ubuntu-latest @@ -67,3 +69,27 @@ jobs: exit 1 fi echo OK + test-version-prefix: + defaults: + run: + shell: bash + strategy: + max-parallel: 1 + matrix: + system: + - ubuntu-latest + - macos-latest + - windows-latest + runs-on: ${{ matrix.system }} + steps: + - uses: actions/checkout@v3 + - name: run action with latest + uses: ./ + with: + version: 0.15.1 + - name: test CML specific version + run: | + if [ "$(cml --version 2>&1)" != '0.15.1' ]; then + exit 1 + fi + echo OK diff --git a/README.md b/README.md index 2650090..4f5229d 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,17 @@ steps: - uses: actions/checkout@v3 - uses: iterative/setup-cml@v2 with: - version: '0.18.1' + version: 'v0.18.1' +``` + +Without vega tools +```yaml +steps: + - uses: actions/checkout@v3 + - uses: iterative/setup-cml@v2 + with: + version: 'v0.20.0' + vega: false ``` ## Inputs @@ -93,3 +103,11 @@ When using the `cml runner launch` command a [PAT is required](https://cml.dev/d ### CML functions CML provides several helper functions. See [the docs](https://cml.dev/doc). + +## Contributing + +To get started after cloning the repo, run `npm ci` (clean-install). +Before pushing changes or opening a PR run `npm run format && npm run lint` to +ensure that the code is formatted and linted. + +run `npm run build` to compile the action. diff --git a/dist/index.js b/dist/index.js index 7f9eed3..49b5b63 100644 --- a/dist/index.js +++ b/dist/index.js @@ -14938,7 +14938,7 @@ function getCmlDownloadUrl(version, assetName) { const response = yield octokit.repos.getReleaseByTag({ owner: 'iterative', repo: 'cml', - tag: version + tag: version.startsWith('v') ? version : `v${version}` }); release = response.data; } diff --git a/src/setup-cml.ts b/src/setup-cml.ts index 27c3a6f..426a209 100644 --- a/src/setup-cml.ts +++ b/src/setup-cml.ts @@ -70,7 +70,7 @@ async function getCmlDownloadUrl( const response = await octokit.repos.getReleaseByTag({ owner: 'iterative', repo: 'cml', - tag: version + tag: version.startsWith('v') ? version : `v${version}` }); release = response.data; }