Skip to content

Commit 855600f

Browse files
committed
Fine tuning release scripts
1 parent ce48bc5 commit 855600f

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

.github/workflows/pr.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99

1010
jobs:
1111
run_on_merge:
12-
if: github.event.pull_request.merged == true
12+
if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch'
1313
runs-on: ubuntu-24.04
1414

1515
steps:
@@ -21,19 +21,18 @@ jobs:
2121
run: |
2222
RELEASE_VERSION=$(sed -n '2p' Configurations/Project-Shared.xcconfig | cut -d '=' -f2 | tr -d ' ')
2323
echo "Found version: $RELEASE_VERSION"
24-
echo "NEW_RELEASE_VERSION=v$RELEASE_VERSION" >> $GITHUB_ENV
24+
echo "new_release_tag=v$RELEASE_VERSION" >> $GITHUB_OUTPUT
2525
2626
- name: "🚀 Create a release"
2727
id: create_release
2828
uses: actions/create-release@v1
2929
env:
3030
GITHUB_TOKEN: ${{ secrets.RELEASE_PAT }}
31-
NEW_RELEASE_VERSION: ${{ steps.find_version.outputs.NEW_RELEASE_VERSION }}
3231
with:
33-
tag_name: ${{ env.NEW_RELEASE_VERSION }}
34-
release_name: "Release: ${{ env.NEW_RELEASE_VERSION }}"
32+
tag_name: ${{ steps.find_version.outputs.new_release_tag }}
33+
release_name: "Release: ${{ steps.find_version.outputs.new_release_tag }}"
3534
body: |
36-
Release ${{ env.NEW_RELEASE_VERSION }}
35+
Release [${{ steps.find_version.outputs.new_release_tag }}](https://${{ github.server_url }}/surpher/PactSwiftMockServerXCFramework/releases/tag/${{ steps.find_version.outputs.new_release_tag }}).
3736
- PR: #${{ github.event.pull_request.number }}
3837
- URL: ${{ github.event.pull_request.url }}
3938
- Commits: ${{ github.event.pull_request.commits_url }}

Support/Scripts/release

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ function github_create_pull_request_for_new_version {
206206
local version_branch="$2"
207207
local pr_message="Release: [$version_tag](https://github.com/$REPO_OWNER/$RELEASE_REPO_NAME/releases/tag/$version_tag)"
208208
local dry_run=; dry_run=$([ "$DRY_RUN" = true ] && echo "--dry-run" || echo "")
209-
local open_pr_cmd="gh pr create --draft --base $PR_HEAD_BRANCH --head \"$version_branch\" $dry_run --title \"$version_tag\" --body \"$pr_message\" --repo $REPO_OWNER/$XCPRODUCT_NAME"
209+
local open_pr_cmd="gh pr create --base $PR_HEAD_BRANCH --head \"$version_branch\" $dry_run --title \"$version_tag\" --body \"$pr_message\" --repo $REPO_OWNER/$XCPRODUCT_NAME"
210210

211211
echo "🗃️ Opening a draft pull request..."
212212
execute_cmd "$open_pr_cmd"

0 commit comments

Comments
 (0)