We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 126e4d5 commit 45cc376Copy full SHA for 45cc376
.github/workflows/release.yml
@@ -88,9 +88,18 @@ jobs:
88
run: |
89
git config --local user.email "action@github.com"
90
git config --local user.name "GitHub Action"
91
+
92
+ # Get the default branch (usually main or master)
93
+ DEFAULT_BRANCH=$(git remote show origin | grep 'HEAD branch' | cut -d' ' -f5)
94
95
+ # Checkout the default branch
96
+ git fetch origin $DEFAULT_BRANCH
97
+ git checkout -B $DEFAULT_BRANCH origin/$DEFAULT_BRANCH
98
99
+ # Now make your changes and commit them
100
git add Formula/tctl.rb Formula/Versions/tctl@$VERSION.rb
101
git commit -m "Update formulas for version $VERSION"
- git push
102
+ git push origin $DEFAULT_BRANCH
103
104
- name: Create Release
105
id: create_release
0 commit comments