Add ref_name input to beta and production deploy workflows#2681
Add ref_name input to beta and production deploy workflows#2681
Conversation
Allow deploying from a specific branch, tag, or commit SHA instead of being locked to release/<version> (beta) or master (production). Follows the same pattern used in freighter-mobile's ios.yml. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the manual beta and production deployment workflows to allow checking out and deploying from an explicitly provided git ref (branch/tag/commit SHA) rather than always using a fixed branch pattern.
Changes:
- Add a
ref_nameworkflow_dispatchinput to both beta and production workflows. - Add a “Set ref” step and use it to drive
actions/checkout’sref.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| .github/workflows/submitProduction.yml | Adds ref_name input and uses it to check out a chosen ref for production deploys. |
| .github/workflows/submitBeta.yml | Adds ref_name input and uses it to check out a chosen ref for beta deploys. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.github/workflows/submitBeta.yml
Outdated
| - name: Set ref | ||
| run: | | ||
| if [[ "${{ github.event.inputs.ref_name }}" != "" ]]; then | ||
| echo "REF_NAME=${{ github.event.inputs.ref_name }}" >> $GITHUB_ENV | ||
| else | ||
| echo "REF_NAME=release/${{ github.event.inputs.release }}" >> $GITHUB_ENV | ||
| fi | ||
| - name: Checkout code | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| ref: release/${{ github.event.inputs.release }} | ||
| ref: ${{ env.REF_NAME }} |
There was a problem hiding this comment.
Since this workflow can now check out a custom ref_name, the GitHub Release tag should be created against that same commit. actions/create-release@v1 will create the tag on the default branch unless target_commitish is provided, so beta releases may end up pointing at the wrong code when ref_name (or release/<release>) is checked out. Set target_commitish to the checked-out SHA/ref when creating the release.
|
@copilot apply changes based on the comments in this thread |
…lease steps Agent-Logs-Url: https://github.com/stellar/freighter/sessions/ae5f4081-18f2-47cc-8370-f8bb4255ead4 Co-authored-by: piyalbasu <6789586+piyalbasu@users.noreply.github.com>
Applied all changes from that review thread in commit
|
ref_namedescription in submitProduction.yml (was "defaults to master", now "defaults to the selected branch or tag")echo REF_NAME=... >> $GITHUB_ENVwith inline GitHub expression inactions/checkoutreffield (both workflows)target_commitish(checked-out SHA viagit rev-parse HEAD) toactions/create-release@v1in both workflows to ensure releases point to the correct commit