Skip to content

manver-action

Actions
Manifest version extraction utility
1.1.0
Latest
Star (1)

manver-action

github release test module type: esm license conventional commits yarn

Extract version metadata

Contents

What is this?

This is a simple action for extracting version metadata.

Use

---
name: ci
on:
  - pull_request
  - push
  - workflow_dispatch
jobs:
  preflight:
    runs-on: ubuntu-latest
    outputs:
      version: ${{ steps.version.outputs.build }}
    steps:
      - id: checkout
        name: Checkout ${{ github.head_ref || github.ref_name }}
        uses: actions/[email protected]
        with:
          persist-credentials: false
          ref: ${{ github.head_ref || github.ref }}
      - id: version
        name: Extract version metadata
        uses: flex-development/[email protected]

Inputs

branch

default: ${{ github.head_ref || github.ref_name }}

The name of the branch to check when generating a build version (optional).

build

default: ${{ github.event.pull_request.head.sha || github.sha }}

Build metadata (optional).

manifest

default: package.json

The path to the manifest file (optional).

Manifest files are expected to be compatible with jq.

property

default: .version

Version property path in manifest file (optional).

release-branch-prefix

default: release/

The prefix used to mark release branches (optional).

Build versions generated from release branches will not have metadata attached.

tag-prefix

The prefix to prepend when generating release tags (optional).

Outputs

build

Build version (generated from outputs.manifest and inputs.build).

manifest

The value of property in the manifest file.

tag

Release tag generated from manifest version.

tag-build

Release tag generated from build version.

Related

Contribute

See CONTRIBUTING.md.

This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.

manver-action is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Manifest version extraction utility
1.1.0
Latest

manver-action is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.