jacobtomlinson / gha-anaconda-package-version

Get the latest version of an Anaconda package
MIT License
3 stars 4 forks source link

Anaconda Package Version

GitHub Marketplace Actions Status Actions Status

A GitHub Action to get the latest version of a package from Anaconda.

Usage

Example workflow

name: My Workflow
on: [push, pull_request]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - name: Run action
      uses: jacobtomlinson/gha-anaconda-package-version@master
      with:
        org: anaconda
        package: python
        version_system: SemVer

Inputs

Input Description
org The Anaconda user or organization
package The name of the Python package
version_system The name of the version system: SemVer (default) or CalVer.

Outputs

Output Description
version The version of the package

Examples

Using outputs

Here is an example of getting the version of the latest Anaconda Python distribution and printing it out in the next step.

name: My Workflow
on: [push, pull_request]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - name: Get latest Anaconda Python version
      id: anaconda
      uses: jacobtomlinson/gha-anaconda-package-version@master
      with:
        org: anaconda
        package: python
        version_system: SemVer

    - name: Check outputs
        run: |
          echo "The latest version of Python is ${{ steps.anaconda.outputs.version }}."