No description
  • JSON 64.1%
  • TypeScript 35.9%
Find a file
2026-05-07 15:26:30 +02:00
.flox 🔧 Update flox schema version 2026-05-07 13:25:38 +02:00
.husky 🔧 Update hooks 2026-02-04 11:00:01 +01:00
.zed 🧑‍💻 Add zed settings 2026-02-04 10:59:45 +01:00
__tests__ Add doc - small fixes - add tests 2026-05-07 15:24:28 +02:00
dist Add doc - small fixes - add tests 2026-05-07 15:24:28 +02:00
src Add doc - small fixes - add tests 2026-05-07 15:24:28 +02:00
.env.example ⚰️ Remove unused input 2026-03-18 13:11:23 +01:00
.envrc 🧑‍💻 Move from devenv to flox 2026-02-04 10:57:15 +01:00
.gitignore 🏗️ Use new action architecture 2026-02-04 10:58:52 +01:00
action.yml ⚰️ Remove unused input 2026-03-18 13:11:23 +01:00
biome.json 🧑‍💻 Use Biome for linting 2026-02-04 10:57:54 +01:00
package.json 🛂 Adapt repo names 2026-05-07 15:26:30 +02:00
pnpm-lock.yaml ⬇️ Align @types/node version with node version 2026-05-07 13:27:49 +02:00
README.md Add doc - small fixes - add tests 2026-05-07 15:24:28 +02:00
rollup.config.ts 🏗️ Use new action architecture 2026-02-04 10:58:52 +01:00
tsconfig.json 🔧 Update tsconfig 2026-05-07 13:28:05 +02:00

calver

Forgejo / GitHub Actions action that computes the next CalVer tag (YYYY.M.N) for the current repository.

The patch number (N) is:

  • reset to 0 for the first tag of a new month,
  • incremented for each new release in the same month,
  • kept as-is if the latest tag of the month carries a suffix (-rc1, -beta, …), allowing a pre-release to be promoted.

The action only computes the version: it does not create commits, tags, or releases. The computed tag is exposed via the tag output; it is up to you to use it in the next steps of your workflow.

Inputs

Name Required Default Description
token yes Forgejo API token with read access to tags.
year-format no YYYY Year format. Accepted values: YYYY or YY.

Outputs

Name Description
tag Computed CalVer version (e.g. 2026.5.3).

Example usage

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - name: Increment and tag with CalVer
        id: version
        uses: https://git.intranet.h-augenplus.fr/actions/calver@v3.3.0
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          year-format: "YYYY"
      - name: Computed build number
          id: build
          run: echo "number=${{ github.run_id }}${{ github.run_attempt }}" >> "$GITHUB_OUTPUT"

Tag format

A tag is recognized if it matches:

YYYY.M.N        e.g. 2026.5.0,  2026.12.3
YYYY.M.N-suffix e.g. 2026.5.3-12345

Development

Requirements: Node.js 24, pnpm.

pnpm install
pnpm test       # unit tests (node:test)
pnpm package    # bundle into dist/
pnpm local      # run the action locally with @github/local-action

The dist/index.js bundle must be committed: it is what the runner executes.

License

ISC.