{"id":48660991,"url":"https://github.com/askb/maven-stage-prep-action","last_synced_at":"2026-04-10T10:09:29.035Z","repository":{"id":350150351,"uuid":"1205539549","full_name":"askb/maven-stage-prep-action","owner":"askb","description":"Prepare Maven project for staging release — remove SNAPSHOT versions, create git patch/bundle artifacts","archived":false,"fork":false,"pushed_at":"2026-04-09T04:00:31.000Z","size":23,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-09T05:34:21.247Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/askb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSES/Apache-2.0.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-09T03:51:26.000Z","updated_at":"2026-04-09T03:59:44.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/askb/maven-stage-prep-action","commit_stats":null,"previous_names":["askb/maven-stage-prep-action"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/askb/maven-stage-prep-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/askb%2Fmaven-stage-prep-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/askb%2Fmaven-stage-prep-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/askb%2Fmaven-stage-prep-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/askb%2Fmaven-stage-prep-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/askb","download_url":"https://codeload.github.com/askb/maven-stage-prep-action/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/askb%2Fmaven-stage-prep-action/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31637768,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-10T07:40:12.752Z","status":"ssl_error","status_checked_at":"2026-04-10T07:40:11.664Z","response_time":98,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-10T10:09:28.402Z","updated_at":"2026-04-10T10:09:29.029Z","avatar_url":"https://github.com/askb.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\n# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2025 The Linux Foundation\n--\u003e\n\n# 📦 Maven Stage Prep Action\n\nComposite GitHub Action to prepare a Maven project for staging release.\nThis is the GitHub Actions replacement for JJB's `maven-patch-release.sh` and\n`lf-maven-versions-plugin` scripts.\n\n## Description\n\nThis action automates the release preparation workflow for Maven projects\nmanaged via Gerrit. It removes `-SNAPSHOT` suffixes from POM versions,\ncreates git format-patch and bundle artifacts, and records the commit hash\nfor downstream tagging.\n\n## Features\n\n- Remove `-SNAPSHOT` from POM versions using **sed** (default) or the\n  **Maven versions-plugin**\n- Create `git format-patch` for the release commit\n- Create `git bundle` for the release commit\n- Record commit SHA in `taglist.log` for downstream tagging\n- Output the release version string for downstream jobs\n- Generate GitHub Step Summary with release details\n\n## Usage\n\n### Basic Example (sed method)\n\n```yaml\n- uses: actions/checkout@v4\n  with:\n    fetch-depth: 0\n\n- name: Maven stage prep\n  id: stage-prep\n  uses: askb/maven-stage-prep-action@main\n  with:\n    project-name: 'my-project'\n    gerrit-branch: 'master'\n\n- name: Upload artifacts\n  uses: actions/upload-artifact@v4\n  with:\n    name: staging-artifacts\n    path: |\n      ${{ steps.stage-prep.outputs.patch-path }}\n      ${{ steps.stage-prep.outputs.bundle-path }}\n      ${{ steps.stage-prep.outputs.taglist-path }}\n```\n\n### Versions-Plugin Method\n\n```yaml\n- uses: actions/checkout@v4\n  with:\n    fetch-depth: 0\n\n- name: Maven stage prep\n  id: stage-prep\n  uses: askb/maven-stage-prep-action@main\n  with:\n    project-name: 'my-project'\n    gerrit-branch: 'master'\n    version-method: 'versions-plugin'\n    java-version: '21'\n    mvn-version: '3.9.11'\n```\n\n### With Version Override\n\n```yaml\n- name: Maven stage prep\n  id: stage-prep\n  uses: askb/maven-stage-prep-action@main\n  with:\n    project-name: 'my-project'\n    gerrit-branch: 'master'\n    version-method: 'versions-plugin'\n    version-override: '2.0.0'\n```\n\n## Inputs\n\n\u003c!-- markdownlint-disable line-length --\u003e\n\n| Input              | Description                                           | Required | Default   |\n| ------------------ | ----------------------------------------------------- | -------- | --------- |\n| `pom-file`         | Path to root POM file                                 | No       | `pom.xml` |\n| `version-method`   | Method to remove SNAPSHOT: `sed` or `versions-plugin` | No       | `sed`     |\n| `version-override` | Explicit version for versions-plugin `newVersion`     | No       | `\"\"`      |\n| `project-name`     | Project name for patch/bundle file naming             | **Yes**  | —         |\n| `gerrit-branch`    | Branch name for `git format-patch` base ref           | **Yes**  | —         |\n| `java-version`     | OpenJDK version (versions-plugin method)              | No       | `21`      |\n| `mvn-version`      | Maven version (versions-plugin method)                | No       | `3.9.11`  |\n\n\u003c!-- markdownlint-enable line-length --\u003e\n\n## Outputs\n\n| Output            | Description                           |\n| ----------------- | ------------------------------------- |\n| `release-version` | De-SNAPSHOTted release version string |\n| `patch-path`      | Path to git format-patch file         |\n| `bundle-path`     | Path to git bundle file               |\n| `taglist-path`    | Path to `taglist.log` file            |\n\n## How It Works\n\n1. **Record commit hash** — writes `\u003cproject\u003e \u003cSHA\u003e` to\n   `archives/patches/taglist.log`\n2. **Remove SNAPSHOT** — strips `-SNAPSHOT` from all POM `\u003cversion\u003e` tags\n   using sed, or uses the Maven versions-plugin for precise version updates\n3. **Extract release version** — reads the de-SNAPSHOTted version from the\n   root POM\n4. **Git commit** — commits all POM changes as\n   `Release \u003cproject\u003e \u003cversion\u003e`\n5. **Create patch** — runs `git format-patch` against the Gerrit branch\n6. **Create bundle** — runs `git bundle create` for the release commits\n\n## Comparison with JJB\n\nThis action replaces the following JJB scripts:\n\n| JJB Script                  | Action Method                         |\n| --------------------------- | ------------------------------------- |\n| `maven-patch-release.sh`    | `version-method: sed`                 |\n| `lf-maven-versions-plugin`  | `version-method: versions-plugin`     |\n\nThe JJB `maven-patch-release.sh` script:\n\n```bash\nPATCH_DIR=\"$WORKSPACE/archives/patches\"\nmkdir -p \"$PATCH_DIR\"\necho \"$PROJECT\" \"$(git rev-parse --verify HEAD)\" | tee -a \"$PATCH_DIR/taglist.log\"\nfind . -name \"*.xml\" -print0 | xargs -0 sed -i 's/-SNAPSHOT//g'\ngit commit -am \"Release $PROJECT\"\ngit format-patch --stdout \"origin/$GERRIT_BRANCH\" \u003e \"$PATCH_DIR/${PROJECT//\\//-}.patch\"\ngit bundle create \"$PATCH_DIR/${PROJECT//\\//-}.bundle\" \"origin/${GERRIT_BRANCH}..HEAD\"\n```\n\n## License\n\n[Apache-2.0](LICENSES/Apache-2.0.txt)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faskb%2Fmaven-stage-prep-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faskb%2Fmaven-stage-prep-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faskb%2Fmaven-stage-prep-action/lists"}