Reusable GitHub Actions for npm package repositories.
actions/compute-release-tag— readpackage.jsonand compute a semver release tagactions/check-tag-exists— check whether a git tag exists on a remoteactions/create-tag— create a git tag from a provided semver tag and push it tooriginactions/create-release— create a GitHub release from an existing semver tagactions/publish-package— publish an npm package with provenance support using OIDC or an npm token and an explicit npm dist-tagactions/validate-semver— validate a semver major.minor.patch value with optionalvprefix supportactions/validate-package-version— ensure a package.json version matches a release tagactions/resolve-npm-tag— map a semver tag to an npm dist-tag
These composite actions are intended to be consumed directly from this public repo. Workflows that use the git-based actions must check out the target repository, and workflows that read package metadata must provide a Node.js runtime. The actions are intentionally standalone and do not call other shared actions.
uses: askrjs/actions/actions/compute-release-tag@mainOutputs version and tag.
uses: askrjs/actions/actions/check-tag-exists@main
with:
tag: v1.2.3Outputs exists.
uses: askrjs/actions/actions/create-tag@main
with:
tag: v1.2.3Optional inputs include remote, git-user-name, git-user-email, and tag-message.
uses: askrjs/actions/actions/create-release@main
with:
tag: v1.2.3
body: "Release created from package version tag"
github-token: ${{ secrets.GITHUB_TOKEN }}uses: askrjs/actions/actions/validate-semver@main
with:
semver: v1.2.3Outputs value and normalized.
uses: askrjs/actions/actions/validate-package-version@main
with:
package-json-path: package.json
tag: v1.2.3Outputs version, tag, and normalized.
uses: askrjs/actions/actions/resolve-npm-tag@main
with:
semver: v1.2.3-beta.1Outputs npm_tag and version.
uses: askrjs/actions/actions/publish-package@main
with:
npm-tag: latest
npm-token: ${{ secrets.NPM_TOKEN }}For OIDC-based publish, omit npm-token and ensure the workflow has permissions.id-token: write.
actions/compute-release-taghas no special permissions requirementsactions/check-tag-existshas no special permissions requirementsactions/create-tagrequirescontents: writeto push tagsactions/create-releaserequirescontents: writeto create releasesactions/publish-packagerequiresid-token: writefor OIDC publishingactions/validate-semverhas no special permissions requirementsactions/validate-package-versionhas no special permissions requirementsactions/resolve-npm-taghas no special permissions requirements
- These are composite actions and do not require repository JavaScript dependencies.
actions/create-releaseuses the GitHub CLI and expectsghto be available on the runner.- The repo intentionally stays minimal: action metadata, docs, and Dependabot config only.