read-version

a github 3rdparty actions that read version from multiple platform.

Usages

with git tags

? Note: keep in mind that this action is working with git tags, so you have to fetch all history for tags with fetch-depth: 0 when checkout.

- name: Checkout
  uses: actions/checkout@v2
  with:
    fetch-depth: 0

...

- name: Read version
  id: read_version
  uses: devecorsoft/[email protected]
  with:
    destination: "git-tag"

- name: Echo version
  run: echo ${{ steps.read_version.outputs.version }}

with node

- name: Read version
  uses: devecorsoft/[email protected]
  with:
    destination: "node"

- name: Echo version
  run: echo ${{ steps.read_version.outputs.version }}

with gradle

- name: Read version
  uses: devecorsoft/[email protected]
  with:
    destination: "gradle"

- name: Echo version
  run: echo ${{ steps.read_version.outputs.version }}

with pip

? Note: you probably don’t need this, you can easily get the version of your project by command: python setup.py -V, and this is exactly what I did.

- name: Read version
  uses: devecorsoft/[email protected]
  with:
    destination: "pip"

- name: Echo version
  run: echo ${{ steps.read_version.outputs.version }}

license

MIT

GitHub

View Github