Skip to content

Commit

Permalink
feat(semver): add support for semantic version as input
Browse files Browse the repository at this point in the history
  • Loading branch information
dharsanb authored Jun 19, 2024
2 parents 98cc815 + 48c64ec commit 120cc93
Show file tree
Hide file tree
Showing 9 changed files with 8,052 additions and 1,146 deletions.
31 changes: 29 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,37 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Test Local Action
- name: Test Local Action (specific version)
uses: ./
with:
version: '0.12.0'
version: '0.13.1'

- name: Ensure humctl version 0.13.1 is installed
run: humctl version

- name: Test Local Action (latest minor)
uses: ./
with:
version: '0.13'
token: ${{ secrets.GITHUB_TOKEN }}

- name: Ensure humctl is installed
run: humctl version

- name: Test Local Action (latest major)
uses: ./
with:
version: '0'
token: ${{ secrets.GITHUB_TOKEN }}

- name: Ensure humctl is installed
run: humctl version

- name: Test Local Action (carot range)
uses: ./
with:
version: '^0'
token: ${{ secrets.GITHUB_TOKEN }}

- name: Ensure humctl is installed
run: humctl version
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

GitHub Action to set up the [Humanitec CLI](https://developer.humanitec.com/platform-orchestrator/cli/).


## Usage

```yaml
Expand All @@ -21,7 +20,8 @@ jobs:
uses: humanitec/setup-cli-action@v1
with:
# Check https://github.com/humanitec/cli/releases for available versions
version: "0.17.0"
version: "0.17.0" # Can be an exact version or a semver range https://github.com/npm/node-semver#ranges
token: ${{ secrets.GITHUB_TOKEN }} # Required if a range is specified
- run: humctl version

```
Expand Down
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ inputs:
version:
description: 'CLI version to install'
required: true
token:
description: 'GitHub token (required if a version range is specified)'
required: false

outputs: {}

Expand Down
Loading

0 comments on commit 120cc93

Please sign in to comment.