Extract version metadata
This is a simple action for extracting version metadata.
---
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]
default:
${{ github.head_ref || github.ref_name }}
The name of the branch to check when generating a build version (optional).
default:
${{ github.event.pull_request.head.sha || github.sha }}
Build metadata (optional).
default:
package.json
The path to the manifest file (optional).
Manifest files are expected to be compatible with jq
.
default:
.version
Version property path in manifest
file (optional).
default:
release/
The prefix used to mark release branches (optional).
Build versions generated from release branches will not have metadata attached.
The prefix to prepend when generating release tags (optional).
Build version (generated from outputs.manifest
and inputs.build
).
The value of property
in the manifest
file.
Release tag generated from manifest
version.
Release tag generated from build
version.
flex-development/gh-release-url-action
— create a url for a github releaseflex-development/ghr-url-action
— create a url for a github registryflex-development/jq-action
— execute json queries withjq
flex-development/npm-url-action
— create a url for the npm registry
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.