No description
- JSON 64.1%
- TypeScript 35.9%
| .flox | ||
| .husky | ||
| .zed | ||
| __tests__ | ||
| dist | ||
| src | ||
| .env.example | ||
| .envrc | ||
| .gitignore | ||
| action.yml | ||
| biome.json | ||
| package.json | ||
| pnpm-lock.yaml | ||
| README.md | ||
| rollup.config.ts | ||
| tsconfig.json | ||
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
0for 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.