GitHub Action for Dunamai
Find a file
2023-03-28 15:48:23 +08:00
.github/workflows Resolve workflow deprecations 2022-11-01 00:47:05 +08:00
.editorconfig Initial commit 2020-07-10 20:43:29 -04:00
.gitattributes Initial commit 2020-07-10 20:43:29 -04:00
.gitignore #2: Rewrite as a composite action 2023-03-28 15:38:58 +08:00
.pre-commit-config.yaml #2: Rewrite as a composite action 2023-03-28 15:38:58 +08:00
action.py #2: Fix run_command invocation 2023-03-28 15:48:23 +08:00
action.yaml #2: Pass inputs along to script 2023-03-28 15:46:56 +08:00
CHANGELOG.md Release v1.2.0 2022-10-31 14:12:33 +08:00
LICENSE Initial commit 2020-07-10 20:43:29 -04:00
README.md Resolve workflow deprecations 2022-11-01 00:47:05 +08:00

GitHub Action for Dunamai

This repository provides a GitHub Action that uses Dunamai to determine a dynamic version from your VCS tags.

This requires access to Python in the workflow.

Inputs

  • install (optional, default: "latest"): Version of Dunamai to install (e.g., "1.3.0"). Use the default if you don't need a specific version, or use "none" if your workflow installs Dunamai by other means.
  • env-var (optional, default: ""): Name of environment variable in which to set the dynamic version. If this is empty, no environment variable will be set.
  • command (optional, default: "dunamai from any"): Command to run Dunamai.
  • args (optional, default: ""): Additional arguments to pass to the command.

Outputs

  • version: The dynamic version.

Example

jobs:
  example:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/setup-python@v4
        with:
          python-version: '3.7'
      - uses: actions/checkout@v3
        with:
          # This is necessary so that we have the tags.
          fetch-depth: 0
      - uses: mtkennerly/dunamai-action@v1
        with:
          env-var: MY_VERSION
          args: --style semver
      - run: echo $MY_VERSION