Skip to content
Merged
26 changes: 8 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ on:
package_name:
description: 'Package folder (Name of the package directory under packages/ folder. e.g., xrpl, ripple-address-codec)'
required: true
release_branch:
description: 'Release branch the release is generated from'
required: true
npmjs_dist_tag:
description: 'npm distribution tag(Read more https://docs.npmjs.com/adding-dist-tags-to-packages)'
default: 'latest'
Expand All @@ -30,10 +27,11 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.release_branch }}
fetch-depth: 0

- name: Validate inputs
env:
RELEASE_BRANCH: ${{ github.ref_name }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

env.RELEASE_BRANCH value is not used in this step. What is the need to define this env variable?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for identifying this, i have removed it.

run: |
set -euo pipefail
# Validate package_name
Expand All @@ -47,12 +45,6 @@ jobs:
echo "❌ package_name must be a single directory under packages/." >&2
exit 1
fi
if git ls-remote --exit-code origin "refs/heads/${{ github.event.inputs.release_branch }}" > /dev/null; then
echo "✅ Found release branch: ${{ github.event.inputs.release_branch }}"
else
echo "❌ Release branch ${{ github.event.inputs.release_branch }} not found in remote. Failing workflow."
exit 1
fi

if grep -R --exclude-dir=.git --exclude-dir=.github "artifactory.ops.ripple.com" .; then
echo "❌ Internal Artifactory URL found"
Expand Down Expand Up @@ -115,7 +107,7 @@ jobs:
needs: [get_version]
uses: ./.github/workflows/faucet_test.yml
with:
git_ref: ${{ github.event.inputs.release_branch }}
git_ref: ${{ github.ref }}
secrets: inherit

run_tests:
Expand All @@ -127,7 +119,7 @@ jobs:
needs: [get_version]
uses: ./.github/workflows/nodejs.yml
with:
git_ref: ${{ github.event.inputs.release_branch }}
git_ref: ${{ github.ref }}
secrets: inherit

pre_release:
Expand All @@ -139,11 +131,11 @@ jobs:
env:
PACKAGE_VERSION: "${{ needs.get_version.outputs.package_version }}"
PACKAGE_NAME: "${{ github.event.inputs.package_name }}"
RELEASE_BRANCH: "${{ github.ref_name }}"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to the previous point, I don't see any usages of env.RELEASE_BRANCH in the pre_release job. Why did you define this variable?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for identifying this, i have removed it.

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.release_branch }}
fetch-depth: 0

- name: Set up Node.js
Expand Down Expand Up @@ -245,7 +237,7 @@ jobs:
REPO: ${{ github.repository }}
PKG_NAME: ${{ env.PACKAGE_NAME }}
PKG_VER: ${{ env.PACKAGE_VERSION }}
REL_BRANCH: ${{ github.event.inputs.release_branch }}
REL_BRANCH: ${{ github.ref_name }}
VULN_ART_URL: ${{ steps.vuln_art.outputs.art_url }}
LABELS: security
run: |
Expand Down Expand Up @@ -298,6 +290,7 @@ jobs:
env:
PACKAGE_VERSION: "${{ needs.get_version.outputs.package_version }}"
PACKAGE_NAME: "${{ github.event.inputs.package_name }}"
RELEASE_BRANCH: "${{ github.ref_name }}"
outputs:
reviewers_dev: ${{ steps.get_reviewers.outputs.reviewers_dev }}
reviewers_sec: ${{ steps.get_reviewers.outputs.reviewers_sec }}
Expand All @@ -306,15 +299,14 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.release_branch }}
fetch-depth: 0
- name: Create PR from release branch to main (skips for rc/beta)
id: ensure_pr
if: ${{ github.event.inputs.npmjs_dist_tag == '' || github.event.inputs.npmjs_dist_tag == 'latest' }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
RELEASE_BRANCH: ${{ github.event.inputs.release_branch }}
RELEASE_BRANCH: ${{ github.ref_name }}
VERSION: ${{ needs.get_version.outputs.package_version }}
run: |
set -euo pipefail
Expand Down Expand Up @@ -423,7 +415,6 @@ jobs:
run: |
set -euo pipefail
ARTIFACT_NAME="vulnerability-report"
RELEASE_BRANCH="${{ github.event.inputs.release_branch }}"
COMMIT_SHA="$(git rev-parse --short HEAD)"

echo "Fetching artifact ID for ${ARTIFACT_NAME}..."
Expand Down Expand Up @@ -534,7 +525,6 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.release_branch }}
fetch-depth: 0

- name: Download artifact
Expand Down
2 changes: 1 addition & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ You can manually trigger the release workflow from the [GitHub Actions UI](https
1. Go to **GitHub → Actions → Release Pipeline → Run workflow**
2. Fill in these fields:
- **package_name** → The folder name under `packages/`, e.g., `xrpl` or `ripple-address-codec`.
- **release_branch** → The Git branch the release is generated from, e.g., `release/[email protected]`.
- **release_branch** → The Git branch the release is generated from, A qualified branch name should start with "release-" or "release/", case-insensitive. e.g: `release/[email protected]`, `release-xrpl-4.3.8`, `Release/[email protected]`.
- **npmjs_dist_tag** → The npm distribution tag to publish under. Defaults to `latest`.
- Examples:
- `latest` → Standard production release
Expand Down
Loading