ci-shared

Shared Gitea Actions steps for the extant2000 repos. Public, holds no secrets.

release (auto-release)

Computes the next semver from Conventional Commits since the last vX.Y.Z tag, then creates an annotated tag and a Gitea release on the released commit.

  • type!: or a BREAKING CHANGE: footer = major, feat: = minor, any other commit = patch.
  • Merge commits and commits with [skip release] in the subject do not count. No counted commit since the last tag = no release.
  • First release (no tag yet) = the version the repo declares: initial-version input, VERSION, package.json, a WordPress plugin Version: header, MARKETING_VERSION, Gradle versionName, else 0.1.0.
  • Release notes group commits under Features, Fixes and Other, each linked.
  • Optional: image pushes IMAGE:vX.Y.Z next to IMAGE:<sha8>; npm-token publishes the package as X.Y.Z (skipped when that version is already in the registry). package.json in git is not rewritten.
  • A rerun on a released commit creates nothing new, but still outputs the version, so a failed image push or npm publish can be retried.

Deploy repo, after the deploy job:

  release:
    needs: [deploy]
    if: gitea.event_name == 'push' && gitea.ref == 'refs/heads/main'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with: { fetch-depth: 0 }
      - uses: https://git.extant2000.com/extant2000/ci-shared/release@v1
        with:
          image: git.extant2000.com/extant2000/<image>
          registry-token: ${{ secrets.REGISTRY_TOKEN }}

Library, after the tests:

      - uses: https://git.extant2000.com/extant2000/ci-shared/release@v1
        with:
          npm-token: ${{ secrets.NPM_TOKEN }}

The job token (gitea.token) creates the tag and the release; no extra secret. Outputs: released, version, tag, previous.

Versioning

Workflows pin @v1. Compatible changes move the v1 tag; breaking changes get v2.

Tests

bash test/release.test.sh (runs in the test workflow).

S
Description
Shared Gitea Actions steps (auto-release). Public, no secrets.
Readme
48 KiB
Languages
Shell 100%